{
 "instance": {
  "bld-20200630x10q.htm": {
   "axisCustom": 2,
   "axisStandard": 23,
   "contextCount": 285,
   "dts": {
    "calculationLink": {
     "local": [
      "bld-20200630_cal.xml"
     ]
    },
    "definitionLink": {
     "local": [
      "bld-20200630_def.xml"
     ],
     "remote": [
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-eedm-def-2019-01-31.xml",
      "http://xbrl.fasb.org/srt/2019/elts/srt-eedm1-def-2019-01-31.xml"
     ]
    },
    "inline": {
     "local": [
      "bld-20200630x10q.htm"
     ]
    },
    "labelLink": {
     "local": [
      "bld-20200630_lab.xml"
     ],
     "remote": [
      "https://xbrl.sec.gov/dei/2019/dei-doc-2019-01-31.xml",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-doc-2019-01-31.xml"
     ]
    },
    "presentationLink": {
     "local": [
      "bld-20200630_pre.xml"
     ]
    },
    "referenceLink": {
     "remote": [
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-ref-2019-01-31.xml",
      "https://xbrl.sec.gov/dei/2019/dei-ref-2019-01-31.xml"
     ]
    },
    "schema": {
     "local": [
      "bld-20200630.xsd"
     ],
     "remote": [
      "http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xl-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xlink-2003-12-31.xsd",
      "https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd",
      "http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd",
      "http://www.xbrl.org/2005/xbrldt-2005.xsd",
      "http://www.xbrl.org/dtr/type/nonNumeric-2009-12-16.xsd",
      "http://www.xbrl.org/dtr/type/numeric-2009-12-16.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-gaap-2019-01-31.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-roles-2019-01-31.xsd",
      "http://xbrl.fasb.org/srt/2019/elts/srt-2019-01-31.xsd",
      "http://www.xbrl.org/2006/ref-2006-02-27.xsd",
      "http://xbrl.fasb.org/srt/2019/elts/srt-types-2019-01-31.xsd",
      "http://xbrl.fasb.org/srt/2019/elts/srt-roles-2019-01-31.xsd",
      "https://xbrl.sec.gov/country/2017/country-2017-01-31.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-types-2019-01-31.xsd",
      "http://www.xbrl.org/lrr/role/negated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/reference-2009-12-16.xsd",
      "http://xbrl.fasb.org/us-gaap/2019/elts/us-parts-codification-2019-01-31.xsd",
      "http://www.xbrl.org/lrr/role/deprecated-2009-12-16.xsd"
     ]
    }
   },
   "elementCount": 505,
   "entityCount": 1,
   "hidden": {
    "http://fasb.org/us-gaap/2019-01-31": 10,
    "http://xbrl.sec.gov/dei/2019-01-31": 5,
    "total": 15
   },
   "keyCustom": 58,
   "keyStandard": 324,
   "memberCustom": 34,
   "memberStandard": 21,
   "nsprefix": "bld",
   "nsuri": "http://www.topbuild.com/20200630",
   "report": {
    "R1": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:EntityRegistrantName",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "document",
     "isDefault": "true",
     "longName": "00090 - Document - Document and Entity Information",
     "role": "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation",
     "shortName": "Document and Entity Information",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:EntityRegistrantName",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R10": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10301 - Disclosure - Revenue Recognition",
     "role": "http://www.topbuild.com/role/DisclosureRevenueRecognition",
     "shortName": "Revenue Recognition",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R11": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10401 - Disclosure - Goodwill and Other Intangibles",
     "role": "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangibles",
     "shortName": "Goodwill and Other Intangibles",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R12": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LongTermDebtTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10501 - Disclosure - Long-Term Debt",
     "role": "http://www.topbuild.com/role/DisclosureLongTermDebt",
     "shortName": "Long-Term Debt",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LongTermDebtTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R13": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10601 - Disclosure - Fair Value Measurements",
     "role": "http://www.topbuild.com/role/DisclosureFairValueMeasurements",
     "shortName": "Fair Value Measurements",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R14": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10701 - Disclosure - Segment Information",
     "role": "http://www.topbuild.com/role/DisclosureSegmentInformation",
     "shortName": "Segment Information",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R15": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeasesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10801 - Disclosure - Leases",
     "role": "http://www.topbuild.com/role/DisclosureLeases",
     "shortName": "Leases",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeasesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R16": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10901 - Disclosure - Income Taxes",
     "role": "http://www.topbuild.com/role/DisclosureIncomeTaxes",
     "shortName": "Income Taxes",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R17": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "11001 - Disclosure - Income Per Share",
     "role": "http://www.topbuild.com/role/DisclosureIncomePerShare",
     "shortName": "Income Per Share",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R18": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "11101 - Disclosure - Share-Based Compensation",
     "role": "http://www.topbuild.com/role/DisclosureShareBasedCompensation",
     "shortName": "Share-Based Compensation",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R19": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ShareRepurchaseProgramTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "11201 - Disclosure - Share Repurchase Program",
     "role": "http://www.topbuild.com/role/DisclosureShareRepurchaseProgram",
     "shortName": "Share Repurchase Program",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ShareRepurchaseProgramTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R2": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "00100 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS",
     "role": "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets",
     "shortName": "CONDENSED CONSOLIDATED BALANCE SHEETS",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:AccountsReceivableNetCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R20": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BusinessCombinationDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "11301 - Disclosure - Business Combinations",
     "role": "http://www.topbuild.com/role/DisclosureBusinessCombinations",
     "shortName": "Business Combinations",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BusinessCombinationDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R21": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:AccruedLiabilitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "11401 - Disclosure - Accrued Liabilities",
     "role": "http://www.topbuild.com/role/DisclosureAccruedLiabilities",
     "shortName": "Accrued Liabilities",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:AccruedLiabilitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R22": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "11501 - Disclosure - Other Commitments and Contingencies",
     "role": "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingencies",
     "shortName": "Other Commitments and Contingencies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R23": {
     "firstAnchor": {
      "ancestors": [
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "20202 - Disclosure - Accounting Policies (Policies)",
     "role": "http://www.topbuild.com/role/DisclosureAccountingPoliciesPolicies",
     "shortName": "Accounting Policies (Policies)",
     "subGroupType": "policies",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R24": {
     "firstAnchor": {
      "ancestors": [
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "30303 - Disclosure - Revenue Recognition (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureRevenueRecognitionTables",
     "shortName": "Revenue Recognition (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R25": {
     "firstAnchor": {
      "ancestors": [
       "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfGoodwillTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "30403 - Disclosure - Goodwill and Other Intangibles (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesTables",
     "shortName": "Goodwill and Other Intangibles (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfGoodwillTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R26": {
     "firstAnchor": {
      "ancestors": [
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfDebtTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "30503 - Disclosure - Long-Term Debt (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureLongTermDebtTables",
     "shortName": "Long-Term Debt (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfDebtTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R27": {
     "firstAnchor": {
      "ancestors": [
       "us-gaap:SegmentReportingDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "30703 - Disclosure - Segment Information (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureSegmentInformationTables",
     "shortName": "Segment Information (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:SegmentReportingDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R28": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LeaseCostTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "30803 - Disclosure - Leases (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureLeasesTables",
     "shortName": "Leases (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LeaseCostTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R29": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "31003 - Disclosure - Income Per Share (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureIncomePerShareTables",
     "shortName": "Income Per Share (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R3": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AllowanceForDoubtfulAccountsReceivableCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "00105 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)",
     "role": "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical",
     "shortName": "CONDENSED CONSOLIDATED BALANCE SHEETS (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AllowanceForDoubtfulAccountsReceivableCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R30": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ScheduleOfShareBasedCompensationExpenseTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "31103 - Disclosure - Share-Based Compensation (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables",
     "shortName": "Share-Based Compensation (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ScheduleOfShareBasedCompensationExpenseTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R31": {
     "firstAnchor": {
      "ancestors": [
       "bld:ShareRepurchaseProgramTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ScheduleOfShareRepurchasesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "31203 - Disclosure - Share Repurchase Program (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramTables",
     "shortName": "Share Repurchase Program (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "bld:ShareRepurchaseProgramTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ScheduleOfShareRepurchasesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R32": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfBusinessAcquisitionsByAcquisitionContingentConsiderationTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "31303 - Disclosure - Business Combinations (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureBusinessCombinationsTables",
     "shortName": "Business Combinations (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfBusinessAcquisitionsByAcquisitionContingentConsiderationTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R33": {
     "firstAnchor": {
      "ancestors": [
       "bld:AccruedLiabilitiesDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "31403 - Disclosure - Accrued Liabilities (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesTables",
     "shortName": "Accrued Liabilities (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "bld:AccruedLiabilitiesDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R34": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:BondsOutstandingTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "31503 - Disclosure - Other Commitments and Contingencies (Tables)",
     "role": "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesTables",
     "shortName": "Other Commitments and Contingencies (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:BondsOutstandingTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R35": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "us-gaap:BusinessDescriptionAndBasisOfPresentationTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfReportableSegments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_segment_z9DqnGORcUqPNTG_1waSQw",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40101 - Disclosure - Basis of Presentation (Details)",
     "role": "http://www.topbuild.com/role/DisclosureBasisOfPresentationDetails",
     "shortName": "Basis of Presentation (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "us-gaap:BusinessDescriptionAndBasisOfPresentationTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfReportableSegments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_segment_z9DqnGORcUqPNTG_1waSQw",
      "xsiNil": "false"
     }
    },
    "R36": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_12_31_2019_u45m8idgAUiPhptrdi_7tg",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40201 - Disclosure - Accounting Policies - Recently Adopted Accounting Pronouncements (Details)",
     "role": "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails",
     "shortName": "Accounting Policies - Recently Adopted Accounting Pronouncements (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "us-gaap:NewAccountingPronouncementsPolicyPolicyTextBlock",
       "us-gaap:SignificantAccountingPoliciesTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_12_31_2019_srt_RestatementAxis_srt_RestatementAdjustmentMember_us-gaap_AdjustmentsForNewAccountingPronouncementsAxis_us-gaap_AccountingStandardsUpdate201613Member_2n6Xikk-c0iU60Jc0XGceg",
      "decimals": "-5",
      "lang": null,
      "name": "us-gaap:CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R37": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40301 - Disclosure - Revenue Recognition - Disaggregation (Details)",
     "role": "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
     "shortName": "Revenue Recognition - Disaggregation (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "us-gaap:RevenueFromContractWithCustomerTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_srt_ProductOrServiceAxis_bld_InsulationAndAccessoriesMember_BLKIxU2_dEWVtmKCquA-4A",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R38": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ContractWithCustomerDuration",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40302 - Disclosure - Revenue Recognition - Other (Details)",
     "role": "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails",
     "shortName": "Revenue Recognition - Other (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "bld:ContractWithCustomerDuration",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R39": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfReportingUnits",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_item_28zH06rFoEiCFDGujvIp3g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40401 - Disclosure - Goodwill and Other Intangibles - Goodwill (Details)",
     "role": "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails",
     "shortName": "Goodwill and Other Intangibles - Goodwill (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:NumberOfReportingUnits",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_item_28zH06rFoEiCFDGujvIp3g",
      "xsiNil": "false"
     }
    },
    "R4": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "00200 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS",
     "role": "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:CostOfGoodsAndServicesSold",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R40": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfAcquiredFiniteLivedAndIndefiniteLivedIntangibleAssetTableTextBlock",
       "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:FiniteLivedIntangibleAssetsGross",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40402 - Disclosure - Goodwill and Other Intangibles - Other intangible assets (Details)",
     "role": "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails",
     "shortName": "Goodwill and Other Intangibles - Other intangible assets (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfAcquiredFiniteLivedAndIndefiniteLivedIntangibleAssetTableTextBlock",
       "us-gaap:GoodwillAndIntangibleAssetsDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_12_31_2019_u45m8idgAUiPhptrdi_7tg",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:FiniteLivedIntangibleAssetsGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R41": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:DebtInstrumentCarryingAmount",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40501 - Disclosure - Long-Term Debt - Reconciliation (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
     "shortName": "Long-Term Debt - Reconciliation (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfDebtTableTextBlock",
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:DeferredFinanceCostsNet",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R42": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40502 - Disclosure - Long-Term Debt - Schedule of debt maturity (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails",
     "shortName": "Long-Term Debt - Schedule of debt maturity (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R43": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:DebtInstrumentCarryingAmount",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40503 - Disclosure - Long-Term Debt - Key Terms of Credit Agreement (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
     "shortName": "Long-Term Debt - Key Terms of Credit Agreement (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_12_31_2019_us-gaap_LongtermDebtTypeAxis_bld_EquipmentNotesMember_NUhR6e5gR0K8JoVqR1aMVQ",
      "decimals": "-5",
      "lang": null,
      "name": "us-gaap:DebtInstrumentFaceAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R44": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfKeyFinancialCovenantsTableTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "bld:DebtInstrumentCovenantNetLeverageRatio",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_pure_LP0il3f0Zkm_2J8hCjEXzw",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40504 - Disclosure - Long-Term Debt - Other (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails",
     "shortName": "Long-Term Debt - Other (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfKeyFinancialCovenantsTableTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "2",
      "first": true,
      "lang": null,
      "name": "bld:DebtInstrumentCovenantNetLeverageRatio",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_pure_LP0il3f0Zkm_2J8hCjEXzw",
      "xsiNil": "false"
     }
    },
    "R45": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
       "us-gaap:LongTermDebtTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:DebtInstrumentCarryingAmount",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40601 - Disclosure - Fair Value Measurements (Details)",
     "role": "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails",
     "shortName": "Fair Value Measurements (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "us-gaap:FairValueDisclosuresTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_us-gaap_FairValueByFairValueHierarchyLevelAxis_us-gaap_FairValueInputsLevel1Member_us-gaap_FairValueByMeasurementFrequencyAxis_us-gaap_FairValueMeasurementsNonrecurringMember_us-gaap_LongtermDebtTypeAxis_us-gaap_SeniorNotesMember_rs1fDFRgxkiRaKiLPw6YYw",
      "decimals": "-5",
      "lang": null,
      "name": "us-gaap:DebtInstrumentFairValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R46": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40701 - Disclosure - Segment Information (Details)",
     "role": "http://www.topbuild.com/role/DisclosureSegmentInformationDetails",
     "shortName": "Segment Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
       "us-gaap:SegmentReportingDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_srt_ConsolidationItemsAxis_us-gaap_OperatingSegmentsMember_296MwX0RfUmeiIfhLkLS3w",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:OperatingIncomeLoss",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R47": {
     "firstAnchor": null,
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40801 - Disclosure - Leases - Terms (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLeasesTermsDetails",
     "shortName": "Leases - Terms (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R48": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:OperatingLeaseCost",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40802 - Disclosure - Leases - Components of lease expense (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails",
     "shortName": "Leases - Components of lease expense (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:OperatingLeaseCost",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R49": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40803 - Disclosure - Leases - Future minimum lease payments (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails",
     "shortName": "Leases - Future minimum lease payments (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R5": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "00300 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS",
     "role": "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:DepreciationDepletionAndAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R50": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeaseWeightedAverageRemainingLeaseTerm1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40804 - Disclosure - Leases - Cash flows and other (Details)",
     "role": "http://www.topbuild.com/role/DisclosureLeasesCashFlowsAndOtherDetails",
     "shortName": "Leases - Cash flows and other (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeaseWeightedAverageRemainingLeaseTerm1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R51": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "us-gaap:IncomeTaxDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "3",
      "first": true,
      "lang": null,
      "name": "us-gaap:EffectiveIncomeTaxRateContinuingOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_pure_LP0il3f0Zkm_2J8hCjEXzw",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "40901 - Disclosure - Income Taxes (Details)",
     "role": "http://www.topbuild.com/role/DisclosureIncomeTaxesDetails",
     "shortName": "Income Taxes (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "us-gaap:IncomeTaxDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "3",
      "first": true,
      "lang": null,
      "name": "us-gaap:EffectiveIncomeTaxRateContinuingOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_pure_LP0il3f0Zkm_2J8hCjEXzw",
      "xsiNil": "false"
     }
    },
    "R52": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41001 - Disclosure - Income Per Share - Calculation (Details)",
     "role": "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
     "shortName": "Income Per Share - Calculation (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "INF",
      "lang": null,
      "name": "bld:IncrementalCommonSharesAttributableToDilutiveEffectOfStockOptions",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_shares_rjOB-bAMhkuuSFLpCvAxQw",
      "xsiNil": "false"
     }
    },
    "R53": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_shares_rjOB-bAMhkuuSFLpCvAxQw",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41002 - Disclosure - Income Per Share - Anti-dilutive common stock equivalents (Details)",
     "role": "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails",
     "shortName": "Income Per Share - Anti-dilutive common stock equivalents (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_shares_rjOB-bAMhkuuSFLpCvAxQw",
      "xsiNil": "false"
     }
    },
    "R54": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AllocatedShareBasedCompensationExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41101 - Disclosure - Share-Based Compensation - Expense (Details)",
     "role": "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails",
     "shortName": "Share-Based Compensation - Expense (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:AllocatedShareBasedCompensationExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R55": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfUnrecognizedShareBasedCompensationExpenseNonvestedAwards",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41102 - Disclosure - Share-Based Compensation - Activity (Details)",
     "role": "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
     "shortName": "Share-Based Compensation - Activity (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfUnrecognizedShareBasedCompensationExpenseNonvestedAwards",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R56": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfShareRepurchasesTableTextBlock",
       "bld:ShareRepurchaseProgramTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:TreasuryStockSharesAcquired",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_shares_rjOB-bAMhkuuSFLpCvAxQw",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41201 - Disclosure - Share Repurchase Program (Details)",
     "role": "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails",
     "shortName": "Share Repurchase Program (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:ScheduleOfShareRepurchasesTableTextBlock",
       "bld:ShareRepurchaseProgramTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_4_1_2020_To_6_30_2020_6SK_sB8ERECEUrBDyAT-xQ",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:TreasuryStockSharesAcquired",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_shares_rjOB-bAMhkuuSFLpCvAxQw",
      "xsiNil": "false"
     }
    },
    "R57": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "us-gaap:BusinessCombinationDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "bld:NumberOfBusinessAcquisitions",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_item_28zH06rFoEiCFDGujvIp3g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41301 - Disclosure - Business Combinations - Summary (Details)",
     "role": "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails",
     "shortName": "Business Combinations - Summary (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "us-gaap:BusinessCombinationDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "bld:NumberOfBusinessAcquisitions",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_item_28zH06rFoEiCFDGujvIp3g",
      "xsiNil": "false"
     }
    },
    "R58": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:BusinessCombinationDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_2_27_2017_To_2_27_2017_us-gaap_BusinessAcquisitionAxis_bld_EcoFoamMember_pAGX9_eepkm1hxYGfLLPHA",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "us-gaap:BusinessCombinationConsiderationTransferred1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41302 - Disclosure - Business Combinations - Contingent Consideration (Details)",
     "role": "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
     "shortName": "Business Combinations - Contingent Consideration (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "p",
       "us-gaap:BusinessCombinationDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_2_27_2017_To_2_27_2017_us-gaap_BusinessAcquisitionAxis_bld_EcoFoamMember_pAGX9_eepkm1hxYGfLLPHA",
      "decimals": "-5",
      "first": true,
      "lang": null,
      "name": "us-gaap:BusinessCombinationConsiderationTransferred1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R59": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "bld:AccruedLiabilitiesDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:EmployeeRelatedLiabilitiesCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41401 - Disclosure - Accrued Liabilities (Details)",
     "role": "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails",
     "shortName": "Accrued Liabilities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "bld:AccruedLiabilitiesDisclosureTextBlock",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:EmployeeRelatedLiabilitiesCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R6": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_12_31_2018_us-gaap_StatementEquityComponentsAxis_us-gaap_CommonStockMember_lUGHusZrhE-Wtar71Ib0wQ",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "us-gaap:StockholdersEquity",
      "reportCount": 1,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "00400 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CHANGES IN EQUITY",
     "role": "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF CHANGES IN EQUITY",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2019_To_3_31_2019_us-gaap_StatementEquityComponentsAxis_us-gaap_RetainedEarningsMember_0--oZhnek0yqHsElKHXjEg",
      "decimals": "-3",
      "lang": null,
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R60": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:BondsOutstandingTableTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "bld:PerformanceBondsOutstanding",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "41501 - Disclosure - Other Commitments and Contingencies (Details)",
     "role": "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails",
     "shortName": "Other Commitments and Contingencies (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "bld:BondsOutstandingTableTextBlock",
       "ix:continuation",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "-3",
      "first": true,
      "lang": null,
      "name": "bld:PerformanceBondsOutstanding",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Standard_USD_L0j2CyDwG0GZdPShtvbQ_g",
      "xsiNil": "false"
     }
    },
    "R7": {
     "firstAnchor": {
      "ancestors": [
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_6_30_2020_EREM-gKSc0WeTEbR05_9Xw",
      "decimals": "INF",
      "first": true,
      "lang": null,
      "name": "us-gaap:CommonStockParOrStatedValuePerShare",
      "reportCount": 1,
      "unitRef": "Unit_Divide_USD_shares_-c00-ezC10uUZmMqK6YZUg",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "00405 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CHANGES IN EQUITY (Parenthetical)",
     "role": "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquityParenthetical",
     "shortName": "CONDENSED CONSOLIDATED STATEMENTS OF CHANGES IN EQUITY (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:CommonStockParOrStatedValuePerShare",
       "us-gaap:CommonStockParOrStatedValuePerShare",
       "b",
       "p",
       "td",
       "tr",
       "table",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "As_Of_3_31_2020_y82o9n_la020s3bzQINJsg",
      "decimals": "INF",
      "lang": null,
      "name": "us-gaap:CommonStockParOrStatedValuePerShare",
      "reportCount": 1,
      "unique": true,
      "unitRef": "Unit_Divide_USD_shares_-c00-ezC10uUZmMqK6YZUg",
      "xsiNil": "false"
     }
    },
    "R8": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BusinessDescriptionAndBasisOfPresentationTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10101 - Disclosure - Basis of Presentation",
     "role": "http://www.topbuild.com/role/DisclosureBasisOfPresentation",
     "shortName": "Basis of Presentation",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BusinessDescriptionAndBasisOfPresentationTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R9": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "10201 - Disclosure - Accounting Policies",
     "role": "http://www.topbuild.com/role/DisclosureAccountingPolicies",
     "shortName": "Accounting Policies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "bld-20200630x10q.htm",
      "contextRef": "Duration_1_1_2020_To_6_30_2020_tccxD0MAXku_D5HLkpEvcA",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SignificantAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    }
   },
   "segmentCount": 57,
   "tag": {
    "bld_AcceleratedShareRepurchaseAgreementWithBankOfAmerica2019Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information relating to the accelerated share repurchase agreement with Bank of America, N.A. that was entered into in November 2019.",
        "label": "Accelerated Share Repurchase Agreement With Bank Of America2019 [Member]",
        "terseLabel": "2019 ASR Agreement"
       }
      }
     },
     "localname": "AcceleratedShareRepurchaseAgreementWithBankOfAmerica2019Member",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_AcceleratedShareRepurchaseAgreementWithJpmorganChaseBank2018Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information relating to the accelerated share repurchase agreement with JPMorgan Chase Bank, N.A. that was entered into in November 2018.",
        "label": "Accelerated Share Repurchase Agreement With Jpmorgan Chase Bank2018 [Member]",
        "terseLabel": "2018 ASR Agreement"
       }
      }
     },
     "localname": "AcceleratedShareRepurchaseAgreementWithJpmorganChaseBank2018Member",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_AcceleratedShareRepurchasesInitialSharesDeliveredPercentage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Initial percentage of shares delivered under the accelerated share repurchase agreement.",
        "label": "Accelerated Share Repurchases Initial Shares Delivered Percentage",
        "terseLabel": "Initial percentage of shares delivered under ASR agreement"
       }
      }
     },
     "localname": "AcceleratedShareRepurchasesInitialSharesDeliveredPercentage",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "bld_AcceleratedShareRepurchasesInitialSharesDeliveredShares": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Initial number of shares delivered under the accelerated share repurchase agreement.",
        "label": "Accelerated Share Repurchases, Initial Shares Delivered, Shares",
        "terseLabel": "Initial number of shares delivered under ASR agreement (in shares)"
       }
      }
     },
     "localname": "AcceleratedShareRepurchasesInitialSharesDeliveredShares",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "bld_AcceleratedShareRepurchasesInitialSharesDeliveredValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Initial value of shares delivered under the accelerated share repurchase agreement.",
        "label": "Accelerated Share Repurchases, Initial Shares Delivered, Value",
        "terseLabel": "Initial value of shares delivered under ASR agreement"
       }
      }
     },
     "localname": "AcceleratedShareRepurchasesInitialSharesDeliveredValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred and payable, pertaining to costs that are statutory in nature, are incurred on contractual obligations, or accumulate over time and for which invoices have not yet been received or will not be rendered. Also includes the total of the carrying values as of the balance sheet date of obligations incurred through that date and payable for obligations related to services received from employees, such as accrued salaries and bonuses, payroll taxes and fringe benefits. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accrued Liabilities and Employee-related Liabilities, Current",
        "terseLabel": "Accrued liabilities",
        "totalLabel": "Total accrued liabilities"
       }
      }
     },
     "localname": "AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_AccruedLiabilitiesDisclosureTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for accrued liabilities at the end of the reporting period.",
        "label": "Accrued Liabilities Disclosure [Text Block]",
        "terseLabel": "Accrued Liabilities"
       }
      }
     },
     "localname": "AccruedLiabilitiesDisclosureTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilities"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_AllOtherProductsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents in aggregate all other product categories.",
        "label": "All Other Products [Member]",
        "terseLabel": "All other"
       }
      }
     },
     "localname": "AllOtherProductsMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_AmendedCreditAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information relating to the amended credit agreement entered into March 2020.",
        "label": "Amended Credit Agreement [Member]",
        "terseLabel": "Amended Credit Agreement"
       }
      }
     },
     "localname": "AmendedCreditAgreementMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_BaseRateBorrowingsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents information regarding Base Rate borrowings.",
        "label": "Base Rate Borrowings [Member]",
        "terseLabel": "Base Rate Borrowings"
       }
      }
     },
     "localname": "BaseRateBorrowingsMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_BondsOutstanding": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of bonds outstanding at the end of the reporting period.",
        "label": "Bonds Outstanding",
        "totalLabel": "Total bonds"
       }
      }
     },
     "localname": "BondsOutstanding",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_BondsOutstandingTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of information about bonds outstanding.",
        "label": "Bonds Outstanding [Table Text Block]",
        "terseLabel": "Summary of outstanding bonds"
       }
      }
     },
     "localname": "BondsOutstandingTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_BusinessCombinationConsiderationTransferredLiabilitiesIncurredContingentConsideration": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of contingent consideration recognized by the acquirer as part of consideration transferred in a business combination.",
        "label": "Business Combination, Consideration Transferred, Liabilities Incurred, Contingent Consideration",
        "terseLabel": "Contingent consideration"
       }
      }
     },
     "localname": "BusinessCombinationConsiderationTransferredLiabilitiesIncurredContingentConsideration",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_BusinessCombinationContingentConsiderationPaymentPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The payment period related to the contingent consideration arrangement.",
        "label": "Business Combination, Contingent Consideration, Payment Period",
        "terseLabel": "Contingent consideration, payment period"
       }
      }
     },
     "localname": "BusinessCombinationContingentConsiderationPaymentPeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "bld_ChangeInControlScenarioMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The scenario representing a change in control.",
        "label": "Change In Control Scenario [Member]",
        "terseLabel": "Change in Control Scenario"
       }
      }
     },
     "localname": "ChangeInControlScenarioMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_CommercialMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information pertaining to the commercial market.",
        "label": "Commercial [Member]",
        "terseLabel": "Commercial"
       }
      }
     },
     "localname": "CommercialMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ContingentConsiderationMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information relating to contingent consideration in a business combination.",
        "label": "Contingent Consideration [Member]",
        "terseLabel": "Contingent Consideration"
       }
      }
     },
     "localname": "ContingentConsiderationMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ContractWithCustomerDuration": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The general duration of contracts with customers.",
        "label": "Contract with Customer Duration",
        "terseLabel": "Customer contract period"
       }
      }
     },
     "localname": "ContractWithCustomerDuration",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "bld_CooperGlassMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information pertaining to Cooper, a commercial glass company, based in Marion, Arkansas.",
        "label": "Cooper Glass [Member]",
        "terseLabel": "Cooper Glass"
       }
      }
     },
     "localname": "CooperGlassMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_DebitInstrumentApplicableMarginBasedOnTotalLeverageRatio": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the applicable margin based on the total leverage ratio per the terms of the credit agreement.",
        "label": "Debit Instrument Applicable Margin Based on Total Leverage Ratio",
        "terseLabel": "Applicable margin based on total leverage ratio"
       }
      }
     },
     "localname": "DebitInstrumentApplicableMarginBasedOnTotalLeverageRatio",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "bld_DebtInstrumentCovenantMinimumInterestCoverageRatio": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the minimum interest coverage ratio allowed under the terms of the credit agreement's covenants.",
        "label": "Debt Instrument Covenant Minimum Interest Coverage Ratio",
        "terseLabel": "Minimum Interest Coverage Ratio"
       }
      }
     },
     "localname": "DebtInstrumentCovenantMinimumInterestCoverageRatio",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "bld_DebtInstrumentCovenantNetLeverageRatio": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the ratio of total debt (less certain cash) to consolidated adjusted earnings before, interest, taxes, depreciation and amortization allowed under the terms of the credit agreement's covenants.",
        "label": "Debt Instrument Covenant Net Leverage Ratio",
        "terseLabel": "Maximum Net Leverage Ratio"
       }
      }
     },
     "localname": "DebtInstrumentCovenantNetLeverageRatio",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "bld_DebtInstrumentInterestRatePercentageFloor": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The debt instrument percentage rate floor.",
        "label": "Debt Instrument Interest Rate Percentage, Floor",
        "terseLabel": "Interest rate floor (as a percent)"
       }
      }
     },
     "localname": "DebtInstrumentInterestRatePercentageFloor",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "bld_DebtInstrumentReferenceRateMaturityPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The maturity of the reference rate.",
        "label": "Debt Instrument Reference Rate Maturity Period",
        "terseLabel": "Maturity of the reference rate"
       }
      }
     },
     "localname": "DebtInstrumentReferenceRateMaturityPeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "bld_DistributionSegmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the distribution segment of the reporting entity.",
        "label": "Distribution Segment [Member]",
        "terseLabel": "Distribution"
       }
      }
     },
     "localname": "DistributionSegmentMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails",
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_EcoFoamMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents information pertaining to EcoFoam, a residential and light commercial insulation installation company.",
        "label": "Eco Foam [Member]",
        "terseLabel": "EcoFoam"
       }
      }
     },
     "localname": "EcoFoamMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_EliminationsAndReconcilingItemsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Eliminating entries used in operating segment consolidation and Items used in reconciling reportable segments' amounts to consolidated amount.",
        "label": "Eliminations And Reconciling Items [Member]",
        "terseLabel": "Intercompany Eliminations and Other Adjustments"
       }
      }
     },
     "localname": "EliminationsAndReconcilingItemsMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_EquipmentNotesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information relating to equipment notes executed under a Master Loan and Security Agreement with Banc of America Leasing &amp;amp; Capital, LLC.",
        "label": "Equipment Notes [Member]",
        "terseLabel": "Equipment Notes"
       }
      }
     },
     "localname": "EquipmentNotesMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_EventOfDefaultScenarioMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The scenario representing an event of default.",
        "label": "Event Of Default Scenario [Member]",
        "terseLabel": "Event of Default Scenario"
       }
      }
     },
     "localname": "EventOfDefaultScenarioMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityAcquisitionDateValue": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of financial instrument classified as a liability on the acquisition date measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliations, Recurring Basis, Liability, Acquisition Date Value",
        "terseLabel": "Fair value of contingent consideration recognized at acquisition date"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityAcquisitionDateValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_FederalFundsRateMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The federal funds rate.",
        "label": "Federal Funds Rate [Member]",
        "terseLabel": "Federal Funds Rate"
       }
      }
     },
     "localname": "FederalFundsRateMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_GlassAndWindowsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents information pertaining to glass and windows product category.",
        "label": "Glass And Windows [Member]",
        "terseLabel": "Glass and windows"
       }
      }
     },
     "localname": "GlassAndWindowsMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_HunterInsulationMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information pertaining to Hunter, an insulation company, based in Long Island, New York.",
        "label": "Hunter Insulation [Member]",
        "terseLabel": "Hunter"
       }
      }
     },
     "localname": "HunterInsulationMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_IncrementalCommonSharesAttributableToDilutiveEffectOfRestrictedStockAwards": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Additional shares included in the calculation of diluted EPS as a result of the potentially dilutive effect of restricted stock awards using the treasury stock method.",
        "label": "Incremental Common Shares Attributable to Dilutive Effect of Restricted Stock Awards",
        "terseLabel": "Restricted stock awards"
       }
      }
     },
     "localname": "IncrementalCommonSharesAttributableToDilutiveEffectOfRestrictedStockAwards",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "bld_IncrementalCommonSharesAttributableToDilutiveEffectOfStockOptions": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Additional shares included in the calculation of diluted EPS as a result of the potentially dilutive effect of stock options using the treasury stock method.",
        "label": "Incremental Common Shares Attributable to Dilutive Effect of Stock Options",
        "terseLabel": "Stock options"
       }
      }
     },
     "localname": "IncrementalCommonSharesAttributableToDilutiveEffectOfStockOptions",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "bld_InstallationSegmentMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the installation segment of the reporting entity.",
        "label": "Installation Segment [Member]",
        "terseLabel": "Installation"
       }
      }
     },
     "localname": "InstallationSegmentMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails",
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_InsulationAndAccessoriesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the information pertaining to the insulation and accessories product.",
        "label": "Insulation And Accessories [Member]",
        "terseLabel": "Insulation and accessories"
       }
      }
     },
     "localname": "InsulationAndAccessoriesMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_LIBORRateBorrowingsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents information relating to LIBOR rate borrowings.",
        "label": "L I B O R Rate Borrowings [Member]",
        "terseLabel": "LIBOR Rate Borrowings"
       }
      }
     },
     "localname": "LIBORRateBorrowingsMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_LicenseAndInsuranceRelatedAndOtherBondsOutstanding": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails": {
       "order": 1.0,
       "parentTag": "bld_BondsOutstanding",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the amount of other type of bonds outstanding, principally license and insurance related.",
        "label": "License and Insurance Related And Other Bonds Outstanding",
        "terseLabel": "Licensing, insurance, and other bonds"
       }
      }
     },
     "localname": "LicenseAndInsuranceRelatedAndOtherBondsOutstanding",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_LineOfCreditFacilityAdditionalBorrowingCapacityAvailableSubjectToCertainConditions": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the additional borrowing capacity available, subject to certain conditions.",
        "label": "Line of Credit Facility Additional Borrowing Capacity Available Subject to Certain Conditions",
        "verboseLabel": "Additional term loan and/or revolver capacity available under incremental facility"
       }
      }
     },
     "localname": "LineOfCreditFacilityAdditionalBorrowingCapacityAvailableSubjectToCertainConditions",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_LineOfCreditFacilitySublimitAvailableForLettersOfCredit": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the sublimit available for the issuance of letters of credit under the credit facility.",
        "label": "Line of Credit Facility Sublimit Available for Letters of Credit",
        "verboseLabel": "Sublimit for issuance of letters of credit under Revolving Facility*"
       }
      }
     },
     "localname": "LineOfCreditFacilitySublimitAvailableForLettersOfCredit",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_LineOfCreditFacilitySublimitAvailableForSwinglineLoans": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the sublimit available for swingline loans under the credit facility.",
        "label": "Line of Credit Facility Sublimit Available for Swingline Loans",
        "verboseLabel": "Sublimit for swingline loans under Revolving Facility*"
       }
      }
     },
     "localname": "LineOfCreditFacilitySublimitAvailableForSwinglineLoans",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_LongTermIncentivePlanMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents information related to the 2015 plan.",
        "label": "Long Term Incentive Plan [Member]",
        "terseLabel": "2015 Plan"
       }
      }
     },
     "localname": "LongTermIncentivePlanMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_MinimumPercentageOfDebtImmediatelyDueAndPayable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The percentage of debtholders needed to declare outstanding principal and accrued interest, if any, immediately due and payable upon an event of default.",
        "label": "Minimum Percentage of Debt Immediately Due and Payable",
        "terseLabel": "Minimum percentage of principal of debt holders to declare debt immediately due and payable"
       }
      }
     },
     "localname": "MinimumPercentageOfDebtImmediatelyDueAndPayable",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "bld_NumberOfBusinessAcquisitions": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The number of business acquisitions during the period.",
        "label": "Number of Business Acquisitions",
        "terseLabel": "Number of acquisitions"
       }
      }
     },
     "localname": "NumberOfBusinessAcquisitions",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "bld_OutstandingBondsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "No definition available.",
        "label": "Outstanding Bonds [Abstract]",
        "terseLabel": "Outstanding Bonds"
       }
      }
     },
     "localname": "OutstandingBondsAbstract",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "bld_PerformanceBondsOutstanding": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails": {
       "order": 2.0,
       "parentTag": "bld_BondsOutstanding",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the amount of performance bonds outstanding.",
        "label": "Performance Bonds Outstanding",
        "terseLabel": "Performance bonds"
       }
      }
     },
     "localname": "PerformanceBondsOutstanding",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingenciesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_ProceedsFromExecutionOfEquipmentNotes": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow associated with the execution of equipment notes supported by a written promise to pay an obligation.",
        "label": "Proceeds from Execution of Equipment Notes",
        "verboseLabel": "Equipment notes issued"
       }
      }
     },
     "localname": "ProceedsFromExecutionOfEquipmentNotes",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_RainGuttersMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the information pertaining to Rain gutter product.",
        "label": "Rain Gutters [Member]",
        "terseLabel": "Rain gutters"
       }
      }
     },
     "localname": "RainGuttersMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ReceivablesNetMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Due from customers or clients for goods or services that have been delivered or sold, net of allowance for doubtful accounts.",
        "label": "Receivables Net [Member]",
        "terseLabel": "Receivables, net"
       }
      }
     },
     "localname": "ReceivablesNetMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_RepurchaseProgram2017Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents information pertaining to 2017 repurchase program.",
        "label": "Repurchase Program2017 [Member]",
        "terseLabel": "2017 Repurchase program"
       }
      }
     },
     "localname": "RepurchaseProgram2017Member",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_RepurchaseProgram2019Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents information pertaining to the 2019 repurchase program.",
        "label": "Repurchase Program2019 [Member]",
        "terseLabel": "2019 Share Repurchase Program"
       }
      }
     },
     "localname": "RepurchaseProgram2019Member",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ResidentialMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information pertaining to the residential market.",
        "label": "Residential [Member]",
        "terseLabel": "Residential"
       }
      }
     },
     "localname": "ResidentialMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_RestrictedStockAwardsGrantedFebruary2017Member": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information pertaining to restricted stock awards granted on February 21, 2017.",
        "label": "Restricted Stock Awards Granted February2017 [Member]",
        "terseLabel": "RSAs granted on February 21, 2017"
       }
      }
     },
     "localname": "RestrictedStockAwardsGrantedFebruary2017Member",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_RevenueRecognitionDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Revenue Recognition Disclosure [Abstract].",
        "label": "Revenue Recognition Disclosure [Abstract]",
        "terseLabel": "Revenue Recognition"
       }
      }
     },
     "localname": "RevenueRecognitionDisclosureAbstract",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "bld_ScheduleOfAcquiredFiniteLivedAndIndefiniteLivedIntangibleAssetTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of finite lived and indefinite lived intangible assets.",
        "label": "Schedule of Acquired Finite-Lived and Indefinite-Lived Intangible Asset [Table Text Block]",
        "terseLabel": "Schedule of other intangible assets"
       }
      }
     },
     "localname": "ScheduleOfAcquiredFiniteLivedAndIndefiniteLivedIntangibleAssetTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfAvailabilityUnderRevolvingFacilityTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents tabular information about the availability under the Revolving Facility.",
        "label": "Schedule of Availability Under Revolving Facility [Table Text Block]",
        "terseLabel": "Schedule of availability under the Revolving Facility"
       }
      }
     },
     "localname": "ScheduleOfAvailabilityUnderRevolvingFacilityTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfCashFlowInformationOperatingLeaseLiabilitiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The schedule of cash flow information from operating activities related to operating lease liabilities.",
        "label": "Schedule of Cash Flow Information, Operating Lease Liabilities [Table Text Block]",
        "terseLabel": "Schedule of cash flow information"
       }
      }
     },
     "localname": "ScheduleOfCashFlowInformationOperatingLeaseLiabilitiesTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfKeyFinancialCovenantsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents tabular information about the key financial covenants.",
        "label": "Schedule of Key Financial Covenants [Table Text Block]",
        "terseLabel": "Schedule of the key financial covenants"
       }
      }
     },
     "localname": "ScheduleOfKeyFinancialCovenantsTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfShareBasedCompensationExpenseTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of share-based compensation expense.",
        "label": "Schedule Of Share Based Compensation Expense Table Text Block",
        "terseLabel": "Schedule of share-based compensation expense and related income tax benefit"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationExpenseTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfShareBasedPaymentAwardOtherThanOptionsValuationAssumptionsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the significant assumptions used during the year to estimate the fair value of awards, other than options, including, but not limited to: (a) expected term, (b) expected volatility of the entity's shares, (c) expected dividends, (d) risk-free rate(s), and (e) discount for post-vesting restrictions.",
        "label": "Schedule of Share-based Payment Award, Other Than Options, Valuation Assumptions [Table Text Block]",
        "terseLabel": "Schedule of key inputs used to estimate the fair value of awards"
       }
      }
     },
     "localname": "ScheduleOfShareBasedPaymentAwardOtherThanOptionsValuationAssumptionsTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfShareBasedPaymentAwardRestrictedStockAwardsPayoutRangeAndRelatedExpenseTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of restricted stock awards with performance-based conditions relating to the grant date fair value, payout range and related expenses.",
        "label": "Schedule of Share-based Payment Award, Restricted Stock Awards, Payout Range and Related Expense [Table Text Block]",
        "terseLabel": "Schedule of the range of payouts and the related expense for RSAs with performance-based conditions"
       }
      }
     },
     "localname": "ScheduleOfShareBasedPaymentAwardRestrictedStockAwardsPayoutRangeAndRelatedExpenseTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfShareRepurchasesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of share repurchases under the Share Repurchase Program.",
        "label": "Schedule of Share Repurchases [Table Text Block]",
        "terseLabel": "Schedule of share repurchase program"
       }
      }
     },
     "localname": "ScheduleOfShareRepurchasesTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ScheduleOfUnrecognizedShareBasedCompensationExpenseNonvestedAwards": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of unrecognized share-based compensation expense related to unvested awards.",
        "label": "Schedule of Unrecognized Share-based Compensation Expense, Nonvested Awards",
        "terseLabel": "Schedule of unrecognized share-based compensation expense relating to unvested awards"
       }
      }
     },
     "localname": "ScheduleOfUnrecognizedShareBasedCompensationExpenseNonvestedAwards",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsConvertedExercisedInPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The number of equity-based payment instruments, excluding stock (or unit) options, that were converted/exercised during the reporting period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Converted, Exercised in Period",
        "negatedLabel": "Converted/Exercised (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsConvertedExercisedInPeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsConvertedExercisedWeightedAverageGrantDateFairValue": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average fair value as of the grant date of equity-based award plans other than stock (unit) option plans that were converted/exercised.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Converted, Exercised, Weighted Average Grant Date Fair Value",
        "terseLabel": "Converted/Exercised (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsConvertedExercisedWeightedAverageGrantDateFairValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedOrExpiredInPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The number of equity-based payment instruments, excluding stock (or unit) options, that were forfeited or expired during the reporting period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Forfeited or Expired in Period",
        "negatedLabel": "Forfeited/Expired (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedOrExpiredInPeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedOrExpiredWeightedAverageGrantDateFairValue": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average fair value as of the grant date of equity-based award plans other than stock (unit) option plans that were forfeited or expired.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Forfeited or Expired, Weighted Average Grant Date Fair Value",
        "terseLabel": "Forfeited/Expired (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedOrExpiredWeightedAverageGrantDateFairValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingVestingPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average remaining vesting period for equity-based awards excluding options, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Outstanding, Weighted Average Remaining Vesting Period",
        "terseLabel": "Restricted stock awards, Weighted average remaining vesting period"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingVestingPeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsEstimatedFairValueOfAwardsGranted": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the estimated fair value of the awards granted.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Fair Value Assumptions Estimated Fair Value Of Awards Granted",
        "verboseLabel": "Estimated fair value of market-based RSAs at grant date (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsEstimatedFairValueOfAwardsGranted",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRemainingMeasurementPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The remaining measurement period of share-based compensation awards, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Remaining Measurement Period",
        "terseLabel": "Measurement period (years)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRemainingMeasurementPeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsConvertedExercisedWeightedAverageGrantDateFairValue": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average grant-date fair value of options converted/exercised.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Converted, Exercised, Weighted Average Grant Date Fair Value",
        "terseLabel": "Converted/Exercised (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsConvertedExercisedWeightedAverageGrantDateFairValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageGrantDateFairValue": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the Share Based Compensation Arrangement By Share Based Payment Award Options Exercisable Weighted Average Grant Date Fair Value.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Options Exercisable Weighted Average Grant Date Fair Value",
        "terseLabel": "Exercisable, Weighted Average Grant Date Fair Value Per Share"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageGrantDateFairValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsNonvestedOptionsForfeitedOrExpiredWeightedAverageGrantDateFairValue": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average grant-date fair value of non-vested options forfeited or expired.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Nonvested Options Forfeited or Expired, Weighted Average Grant Date Fair Value",
        "terseLabel": "Forfeited/Expired (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsNonvestedOptionsForfeitedOrExpiredWeightedAverageGrantDateFairValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageRemainingVestingPeriod": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average remaining vesting period for option awards outstanding, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Remaining Vesting Period",
        "terseLabel": "Stock options, Weighted average remaining vesting period"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageRemainingVestingPeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsCumulativePeriodOfAchievement": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative period of achievement related to restricted stock awards with performance conditions.",
        "label": "Share-based Compensation Arrangement By Share-based Payment Award Other Than Options Grants, Cumulative Period of Achievement",
        "terseLabel": "Cumulative period of achievement"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsCumulativePeriodOfAchievement",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsCumulativePeriodOfAchievementPercentage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative three-year achievement percentage related to the restricted stock awards with performance conditions.",
        "label": "Share-based Compensation Arrangement By Share-based Payment Award Other Than Options Grants, Cumulative Period of Achievement Percentage",
        "terseLabel": "Cumulative achievement percentage"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsCumulativePeriodOfAchievementPercentage",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsInPeriodTotalGrantDateFairValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the total fair value of equity-based awards, other then options, granted during the reporting period.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Other Than Options Grants In Period Total Grant Date Fair Value",
        "terseLabel": "Grant date fair value"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsInPeriodTotalGrantDateFairValue",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsTotalCompensationExpenseRecognizedOverPerformancePeriod": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The total compensation expense recognized over the performance period, net of forfeitures, related to the restricted stock awards with performance conditions.",
        "label": "Share-based Compensation Arrangement By Share-based Payment Award Other Than Options Grants, Total Compensation Expense Recognized Over Performance Period",
        "terseLabel": "Total compensation expense recognized over the performance period, net of forfeitures"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOtherThanOptionsGrantsTotalCompensationExpenseRecognizedOverPerformancePeriod",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information relating to payout ranges of the share-based compensation awards.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award Payout Range [Axis]"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeAxis",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Identification of the payout ranges of the share-based compensation awards.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Payout Range [Domain]",
        "terseLabel": "Share-based Compensation Arrangement by Share-based Payment Award Payout Range [Domain]"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeDomain",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeFourMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Range four of the payout range related to performance-based awards.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Payout Range Four [Member]",
        "terseLabel": "Payout Range-200%"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeFourMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeOneMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Range one of the payout range related to performance-based awards.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Payout Range One [Member]",
        "terseLabel": "Payout Range-0%"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeOneMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangePercentage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The payout range expressed as a percentage of the grant date fair value related to performance-based awards.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Payout Range Percentage",
        "terseLabel": "Payout range (as a percent)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangePercentage",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeRelatedExpenses": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The compensation expense based on the payout range related to performance-based awards.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Payout Range Related Expenses",
        "terseLabel": "Related expenses"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeRelatedExpenses",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeThreeMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Range three of the payout range related to performance-based awards.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Payout Range Three [Member]",
        "terseLabel": "Payout Range-100%"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeThreeMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeTwoMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Range two of the payout range related to performance-based awards.",
        "label": "Share Based Compensation Arrangement By Share Based Payment Award Payout Range Two [Member]",
        "terseLabel": "Payout Range-25%"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPayoutRangeTwoMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_ShareRepurchaseProgramTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for the share repurchase program.",
        "label": "Share Repurchase Program [Text Block]",
        "terseLabel": "Share Repurchase Program"
       }
      }
     },
     "localname": "ShareRepurchaseProgramTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgram"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_SummaryOfKeyTermsOfCreditAgreementTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents tabular information about the key terms of the Credit Agreement.",
        "label": "Summary of The Key Terms of Credit Agreement [Table Text Block]",
        "terseLabel": "Summary of key terms of Amended Credit Agreement"
       }
      }
     },
     "localname": "SummaryOfKeyTermsOfCreditAgreementTableTextBlock",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "bld_TreasuryStockSharesAcquiredCostMethodSettlementOfAcceleratedShareRepurchaseProgram": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares that have been repurchased during the period pursuant to the settlement of a Accelerated Share Repurchase Program.",
        "label": "Treasury Stock Shares Acquired Cost Method, Settlement of Accelerated Share Repurchase Program",
        "terseLabel": "Repurchase of shares pursuant to the settlement of ASR Agreement (in shares)"
       }
      }
     },
     "localname": "TreasuryStockSharesAcquiredCostMethodSettlementOfAcceleratedShareRepurchaseProgram",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "bld_TreasuryStockSharesAcquiredCostMethodShareRepurchaseProgram": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares that have been repurchased during the period pursuant to the Share Repurchase Program and are being held in treasury.",
        "label": "Treasury Stock Shares Acquired Cost Method Share Repurchase Program",
        "terseLabel": "Repurchase of shares pursuant to Repurchase Program (in shares)"
       }
      }
     },
     "localname": "TreasuryStockSharesAcquiredCostMethodShareRepurchaseProgram",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "bld_TreasuryStockValueAcquiredCostMethodSettlementOfAcceleratedShareRepurchaseProgram": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Equity impact of the cost of common stock that was repurchased during the period pursuant to the settlement of a Accelerated Share Repurchase Program.",
        "label": "Treasury Stock Value Acquired Cost Method, Settlement of Accelerated Share Repurchase Program",
        "negatedLabel": "Repurchase of shares pursuant to the settlement of ASR Agreement"
       }
      }
     },
     "localname": "TreasuryStockValueAcquiredCostMethodSettlementOfAcceleratedShareRepurchaseProgram",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_TreasuryStockValueAcquiredCostMethodShareRepurchaseProgram": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Equity impact of the cost of common stock that was repurchased during the period pursuant to the Share Repurchase Program.",
        "label": "Treasury Stock, Value, Acquired, Cost Method, Share Repurchase Program",
        "negatedLabel": "Repurchase of shares pursuant to Repurchase Program"
       }
      }
     },
     "localname": "TreasuryStockValueAcquiredCostMethodShareRepurchaseProgram",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "bld_VestingBasedOnMarketConditionsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents a share based compensation award with vesting based on market conditions.",
        "label": "Vesting Based On Market Conditions [Member]",
        "terseLabel": "Market-based conditions"
       }
      }
     },
     "localname": "VestingBasedOnMarketConditionsMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails",
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_VestingBasedOnPerformanceMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents a share based compensation award with vesting based on achievement of performance conditions.",
        "label": "Vesting Based On Performance [Member]",
        "terseLabel": "Performance-based conditions"
       }
      }
     },
     "localname": "VestingBasedOnPerformanceMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_VestingBasedOnServiceMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents a share based compensation award with vesting based on length of service.",
        "label": "Vesting Based On Service [Member]",
        "terseLabel": "Service-based conditions"
       }
      }
     },
     "localname": "VestingBasedOnServiceMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails",
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_VestingCriteriaAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information about the type of vesting for share-based compensation awards.",
        "label": "Vesting Criteria [Axis]"
       }
      }
     },
     "localname": "VestingCriteriaAxis",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails",
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "stringItemType"
    },
    "bld_VestingCriteriaDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The types of vesting specified for share-based compensation awards.",
        "label": "Vesting Criteria [Domain]",
        "terseLabel": "Vesting Criteria [Domain]"
       }
      }
     },
     "localname": "VestingCriteriaDomain",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails",
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "domainItemType"
    },
    "bld_VikingInsulationMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information pertaining to Viking Insulation, an insulation installation company based in Burbank, California.",
        "label": "Viking Insulation [Member]",
        "terseLabel": "Viking"
       }
      }
     },
     "localname": "VikingInsulationMember",
     "nsuri": "http://www.topbuild.com/20200630",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_AmendmentFlag": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true when the XBRL content amends previously-filed or accepted submission.",
        "label": "Amendment Flag"
       }
      }
     },
     "localname": "AmendmentFlag",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_CityAreaCode": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Area code of city",
        "label": "City Area Code"
       }
      }
     },
     "localname": "CityAreaCode",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_CoverAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Cover page.",
        "label": "Cover page."
       }
      }
     },
     "localname": "CoverAbstract",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "dei_CurrentFiscalYearEndDate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "End date of current fiscal year in the format --MM-DD.",
        "label": "Current Fiscal Year End Date"
       }
      }
     },
     "localname": "CurrentFiscalYearEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "gMonthDayItemType"
    },
    "dei_DocumentFiscalPeriodFocus": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fiscal period values are FY, Q1, Q2, and Q3.  1st, 2nd and 3rd quarter 10-Q or 10-QT statements have value Q1, Q2, and Q3 respectively, with 10-K, 10-KT or other fiscal year statements having FY.",
        "label": "Document Fiscal Period Focus"
       }
      }
     },
     "localname": "DocumentFiscalPeriodFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "fiscalPeriodItemType"
    },
    "dei_DocumentFiscalYearFocus": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This is focus fiscal year of the document report in CCYY format. For a 2006 annual report, which may also provide financial information from prior periods, fiscal 2006 should be given as the fiscal year focus. Example: 2006.",
        "label": "Document Fiscal Year Focus"
       }
      }
     },
     "localname": "DocumentFiscalYearFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "gYearItemType"
    },
    "dei_DocumentPeriodEndDate": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The end date of the period reflected on the cover page if a periodic report. For all other reports and registration statements containing historical data, it is the date up through which that historical data is presented.  If there is no historical data in the report, use the filing date. The format of the date is CCYY-MM-DD.",
        "label": "Document Period End Date"
       }
      }
     },
     "localname": "DocumentPeriodEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "dateItemType"
    },
    "dei_DocumentQuarterlyReport": {
     "auth_ref": [
      "r299"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as an quarterly report.",
        "label": "Document Quarterly Report"
       }
      }
     },
     "localname": "DocumentQuarterlyReport",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentTransitionReport": {
     "auth_ref": [
      "r300"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as a transition report.",
        "label": "Document Transition Report"
       }
      }
     },
     "localname": "DocumentTransitionReport",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentType": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The type of document being provided (such as 10-K, 10-Q, 485BPOS, etc). The document type is limited to the same value as the supporting SEC submission type, or the word 'Other'.",
        "label": "Document Type"
       }
      }
     },
     "localname": "DocumentType",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "submissionTypeItemType"
    },
    "dei_EntityAddressAddressLine1": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Address Line 1 such as Attn, Building Name, Street Name",
        "label": "Entity Address, Address Line One"
       }
      }
     },
     "localname": "EntityAddressAddressLine1",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressCityOrTown": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Name of the City or Town",
        "label": "Entity Address, City or Town"
       }
      }
     },
     "localname": "EntityAddressCityOrTown",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressPostalZipCode": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Code for the postal or zip code",
        "label": "Entity Address, Postal Zip Code"
       }
      }
     },
     "localname": "EntityAddressPostalZipCode",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressStateOrProvince": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Name of the state or province.",
        "label": "Entity Address, State or Province"
       }
      }
     },
     "localname": "EntityAddressStateOrProvince",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "stateOrProvinceItemType"
    },
    "dei_EntityCentralIndexKey": {
     "auth_ref": [
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A unique 10-digit SEC-issued value to identify entities that have filed disclosures with the SEC. It is commonly abbreviated as CIK.",
        "label": "Entity Central Index Key"
       }
      }
     },
     "localname": "EntityCentralIndexKey",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "centralIndexKeyItemType"
    },
    "dei_EntityCommonStockSharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.",
        "label": "Entity Common Stock, Shares Outstanding"
       }
      }
     },
     "localname": "EntityCommonStockSharesOutstanding",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "sharesItemType"
    },
    "dei_EntityCurrentReportingStatus": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate 'Yes' or 'No' whether registrants (1) have filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that registrants were required to file such reports), and (2) have been subject to such filing requirements for the past 90 days. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Current Reporting Status"
       }
      }
     },
     "localname": "EntityCurrentReportingStatus",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityEmergingGrowthCompany": {
     "auth_ref": [
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate if registrant meets the emerging growth company criteria.",
        "label": "Entity Emerging Growth Company"
       }
      }
     },
     "localname": "EntityEmergingGrowthCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityFileNumber": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Commission file number. The field allows up to 17 characters. The prefix may contain 1-3 digits, the sequence number may contain 1-8 digits, the optional suffix may contain 1-4 characters, and the fields are separated with a hyphen.",
        "label": "Entity File Number"
       }
      }
     },
     "localname": "EntityFileNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "fileNumberItemType"
    },
    "dei_EntityFilerCategory": {
     "auth_ref": [
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicate whether the registrant is one of the following: Large Accelerated Filer, Accelerated Filer, Non-accelerated Filer. Definitions of these categories are stated in Rule 12b-2 of the Exchange Act. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Filer Category"
       }
      }
     },
     "localname": "EntityFilerCategory",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "filerCategoryItemType"
    },
    "dei_EntityIncorporationStateCountryCode": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Two-character EDGAR code representing the state or country of incorporation.",
        "label": "Entity Incorporation, State or Country Code"
       }
      }
     },
     "localname": "EntityIncorporationStateCountryCode",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "edgarStateCountryItemType"
    },
    "dei_EntityInteractiveDataCurrent": {
     "auth_ref": [
      "r302"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant has submitted electronically every Interactive Data File required to be submitted pursuant to Rule 405 of Regulation S-T during the preceding 12 months (or for such shorter period that the registrant was required to submit such files).",
        "label": "Entity Interactive Data Current"
       }
      }
     },
     "localname": "EntityInteractiveDataCurrent",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityRegistrantName": {
     "auth_ref": [
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The exact name of the entity filing the report as specified in its charter, which is required by forms filed with the SEC.",
        "label": "Entity Registrant Name"
       }
      }
     },
     "localname": "EntityRegistrantName",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityShellCompany": {
     "auth_ref": [
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant is a shell company as defined in Rule 12b-2 of the Exchange Act.",
        "label": "Entity Shell Company"
       }
      }
     },
     "localname": "EntityShellCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntitySmallBusiness": {
     "auth_ref": [
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicates that the company is a Smaller Reporting Company (SRC).",
        "label": "Entity Small Business"
       }
      }
     },
     "localname": "EntitySmallBusiness",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityTaxIdentificationNumber": {
     "auth_ref": [
      "r301"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The Tax Identification Number (TIN), also known as an Employer Identification Number (EIN), is a unique 9-digit value assigned by the IRS.",
        "label": "Entity Tax Identification Number"
       }
      }
     },
     "localname": "EntityTaxIdentificationNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "employerIdItemType"
    },
    "dei_LocalPhoneNumber": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Local phone number for entity.",
        "label": "Local Phone Number"
       }
      }
     },
     "localname": "LocalPhoneNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_Security12bTitle": {
     "auth_ref": [
      "r297"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Title of a 12(b) registered security.",
        "label": "Title of 12(b) Security"
       }
      }
     },
     "localname": "Security12bTitle",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "securityTitleItemType"
    },
    "dei_SecurityExchangeName": {
     "auth_ref": [
      "r298"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Name of the Exchange on which a security is registered.",
        "label": "Security Exchange Name"
       }
      }
     },
     "localname": "SecurityExchangeName",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "edgarExchangeCodeItemType"
    },
    "dei_TradingSymbol": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Trading symbol of an instrument as listed on an exchange.",
        "label": "Trading Symbol"
       }
      }
     },
     "localname": "TradingSymbol",
     "nsuri": "http://xbrl.sec.gov/dei/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DocumentDocumentAndEntityInformation"
     ],
     "xbrltype": "tradingSymbolItemType"
    },
    "srt_ConsolidationItemsAxis": {
     "auth_ref": [
      "r102",
      "r109"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Consolidation Items [Axis]"
       }
      }
     },
     "localname": "ConsolidationItemsAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ConsolidationItemsDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Consolidation Items [Domain]",
        "terseLabel": "Consolidation Items [Domain]"
       }
      }
     },
     "localname": "ConsolidationItemsDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MajorCustomersAxis": {
     "auth_ref": [
      "r112",
      "r169",
      "r172",
      "r296"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Customer [Axis]"
       }
      }
     },
     "localname": "MajorCustomersAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MaximumMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Maximum [Member]",
        "terseLabel": "Maximum"
       }
      }
     },
     "localname": "MaximumMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails",
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MinimumMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Minimum [Member]",
        "terseLabel": "Minimum"
       }
      }
     },
     "localname": "MinimumMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_NameOfMajorCustomerDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Name Of Major Customer [Domain]",
        "terseLabel": "Customer [Domain]"
       }
      }
     },
     "localname": "NameOfMajorCustomerDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ProductOrServiceAxis": {
     "auth_ref": [
      "r111",
      "r169",
      "r171",
      "r294",
      "r295"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Products and Services [Axis]"
       }
      }
     },
     "localname": "ProductOrServiceAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ProductsAndServicesDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Products And Services [Domain]",
        "terseLabel": "Products and Services [Domain]"
       }
      }
     },
     "localname": "ProductsAndServicesDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RangeAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Range [Axis]"
       }
      }
     },
     "localname": "RangeAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails",
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RangeMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Range [Member]",
        "terseLabel": "Range [Domain]"
       }
      }
     },
     "localname": "RangeMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails",
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RestatementAdjustmentMember": {
     "auth_ref": [
      "r85",
      "r87",
      "r88",
      "r89"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Restatement Adjustment [Member]",
        "terseLabel": "Restatement Adjustment"
       }
      }
     },
     "localname": "RestatementAdjustmentMember",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RestatementAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Restatement [Axis]"
       }
      }
     },
     "localname": "RestatementAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RestatementDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Restatement [Domain]",
        "terseLabel": "Restatement [Domain]"
       }
      }
     },
     "localname": "RestatementDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ScenarioUnspecifiedDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Scenario Unspecified [Domain]",
        "terseLabel": "Scenario, Unspecified [Domain]"
       }
      }
     },
     "localname": "ScenarioUnspecifiedDomain",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_StatementScenarioAxis": {
     "auth_ref": [
      "r146",
      "r265"
     ],
     "lang": {
      "en-US": {
       "role": {
        "label": "Scenario [Axis]"
       }
      }
     },
     "localname": "StatementScenarioAxis",
     "nsuri": "http://fasb.org/srt/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountingPoliciesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Accounting Policies"
       }
      }
     },
     "localname": "AccountingPoliciesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountingStandardsUpdate201613Member": {
     "auth_ref": [
      "r118"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accounting Standards Update 2016-13 Financial Instruments-Credit Losses (Topic 326): Measurement of Credit Losses on Financial Instruments.",
        "label": "Accounting Standards Update201613 [Member]",
        "terseLabel": "Accounting Standards Update 2016-13"
       }
      }
     },
     "localname": "AccountingStandardsUpdate201613Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccountsPayableCurrent": {
     "auth_ref": [
      "r28"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accounts Payable, Current",
        "terseLabel": "Accounts payable"
       }
      }
     },
     "localname": "AccountsPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableNetCurrent": {
     "auth_ref": [
      "r4",
      "r17",
      "r114",
      "r115",
      "r170"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business, classified as current.",
        "label": "Accounts Receivable, Net, Current",
        "verboseLabel": "Receivables, net of an allowance for credit losses of $7,541 at June 30, 2020, and allowance for doubtful accounts of $4,854 at December 31, 2019"
       }
      }
     },
     "localname": "AccountsReceivableNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedIncomeTaxesCurrent": {
     "auth_ref": [
      "r13",
      "r273",
      "r285"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails": {
       "order": 5.0,
       "parentTag": "bld_AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying amount as of the balance sheet date of the unpaid sum of the known and estimated amounts payable to satisfy all currently due domestic and foreign income tax obligations.",
        "label": "Accrued Income Taxes, Current",
        "terseLabel": "Income taxes payable"
       }
      }
     },
     "localname": "AccruedIncomeTaxesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedInsuranceCurrent": {
     "auth_ref": [
      "r7",
      "r8",
      "r33"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "bld_AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred through that date and payable to insurance entities to mitigate potential loss from various risks or to satisfy a promise to provide certain coverage's to employees. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accrued Insurance, Current",
        "terseLabel": "Insurance liabilities"
       }
      }
     },
     "localname": "AccruedInsuranceCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedInsuranceNoncurrent": {
     "auth_ref": [
      "r38"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred through that date and due beyond one year (or beyond one operating cycle if longer) to insurance entities to mitigate potential loss from various risks or to satisfy a promise to provide certain coverages to employees.",
        "label": "Accrued Insurance, Noncurrent",
        "terseLabel": "Long-term portion of insurance reserves"
       }
      }
     },
     "localname": "AccruedInsuranceNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedLiabilitiesMember": {
     "auth_ref": [
      "r33"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This item represents obligations incurred and payable, pertaining to costs that are statutory in nature, are incurred on contractual obligations, or accumulate over time and for which invoices have not yet been received or will not be rendered.",
        "label": "Accrued Liabilities [Member]",
        "terseLabel": "Accrued liabilities"
       }
      }
     },
     "localname": "AccruedLiabilitiesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdditionalPaidInCapitalCommonStock": {
     "auth_ref": [
      "r18"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Value received from shareholders in common stock-related transactions that are in excess of par value or stated value and amounts received from other stock-related transactions. Includes only common stock transactions (excludes preferred stock transactions). May be called contributed capital, capital in excess of par, capital surplus, or paid-in capital.",
        "label": "Additional Paid in Capital, Common Stock",
        "terseLabel": "Additional paid-in capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapitalCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdditionalPaidInCapitalMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Excess of issue price over par or stated value of the entity's capital stock and amounts received from other transactions involving the entity's stock or stockholders.",
        "label": "Additional Paid In Capital [Member]",
        "terseLabel": "Additional Paid-in Capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapitalMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdjustmentsForNewAccountingPronouncementsAxis": {
     "auth_ref": [
      "r84"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by new accounting pronouncement.",
        "label": "Adjustments for New Accounting Pronouncements [Axis]"
       }
      }
     },
     "localname": "AdjustmentsForNewAccountingPronouncementsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of decrease to equity for grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Adjustments Related to Tax Withholding for Share-based Compensation",
        "negatedLabel": "Shares withheld to pay taxes on employees' equity awards"
       }
      }
     },
     "localname": "AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue": {
     "auth_ref": [
      "r177",
      "r179",
      "r208",
      "r209"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase to additional paid-in capital (APIC) for recognition of cost for award under share-based payment arrangement.",
        "label": "Adjustments to Additional Paid in Capital, Share-based Compensation, Requisite Service Period Recognition",
        "terseLabel": "Share-based compensation"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract]",
        "terseLabel": "Adjustments to reconcile net income to net cash provided by operating activities:"
       }
      }
     },
     "localname": "AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AllocatedShareBasedCompensationExpense": {
     "auth_ref": [
      "r179",
      "r203",
      "r207"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expense for award under share-based payment arrangement. Excludes amount capitalized.",
        "label": "Allocated Share-based Compensation Expense",
        "terseLabel": "Share-based compensation expense"
       }
      }
     },
     "localname": "AllocatedShareBasedCompensationExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AllowanceForDoubtfulAccountsReceivableCurrent": {
     "auth_ref": [
      "r23",
      "r116",
      "r119"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of allowance for credit loss on accounts receivable, classified as current.",
        "label": "Allowance for Doubtful Accounts Receivable, Current",
        "terseLabel": "Allowance for doubtful accounts"
       }
      }
     },
     "localname": "AllowanceForDoubtfulAccountsReceivableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AmortizationOfFinancingCosts": {
     "auth_ref": [
      "r51",
      "r72",
      "r247"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of amortization expense attributable to debt issuance costs.",
        "label": "Amortization of Financing Costs",
        "terseLabel": "Amortization of debt issuance costs"
       }
      }
     },
     "localname": "AmortizationOfFinancingCosts",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AmortizationOfIntangibleAssets": {
     "auth_ref": [
      "r72",
      "r135",
      "r138"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate expense charged against earnings to allocate the cost of intangible assets (nonphysical assets not used in production) in a systematic and rational manner to the periods expected to benefit from such assets. As a noncash expense, this element is added back to net income when calculating cash provided by or used in operations using the indirect method.",
        "label": "Amortization of Intangible Assets",
        "terseLabel": "Amortization expense"
       }
      }
     },
     "localname": "AmortizationOfIntangibleAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount": {
     "auth_ref": [
      "r96"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) or earnings per unit (EPU) in the future that were not included in the computation of diluted EPS or EPU because to do so would increase EPS or EPU amounts or decrease loss per share or unit amounts for the period presented.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount",
        "verboseLabel": "Total anti-dilutive common stock equivalents"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis": {
     "auth_ref": [
      "r96"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of antidilutive security.",
        "label": "Antidilutive Securities [Axis]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]",
        "terseLabel": "Anti-dilutive common stock equivalents"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesNameDomain": {
     "auth_ref": [
      "r96"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Incremental common shares attributable to securities that were not included in diluted earnings per share (EPS) because to do so would increase EPS amounts or decrease loss per share amounts for the period presented.",
        "label": "Antidilutive Securities Name [Domain]",
        "terseLabel": "Antidilutive Securities, Name [Domain]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Assets": {
     "auth_ref": [
      "r106",
      "r271",
      "r284"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are recognized. Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets",
        "totalLabel": "Total assets"
       }
      }
     },
     "localname": "Assets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Assets [Abstract]",
        "terseLabel": "ASSETS"
       }
      }
     },
     "localname": "AssetsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AssetsCurrent": {
     "auth_ref": [
      "r5",
      "r6",
      "r43"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are expected to be realized in cash, sold, or consumed within one year (or the normal operating cycle, if longer). Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets, Current",
        "totalLabel": "Total current assets"
       }
      }
     },
     "localname": "AssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Assets, Current [Abstract]",
        "terseLabel": "Current assets:"
       }
      }
     },
     "localname": "AssetsCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AwardTypeAxis": {
     "auth_ref": [
      "r180",
      "r205"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of award under share-based payment arrangement.",
        "label": "Award Type [Axis]"
       }
      }
     },
     "localname": "AwardTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BalanceSheetLocationAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by location on balance sheet (statement of financial position).",
        "label": "Balance Sheet Location [Axis]"
       }
      }
     },
     "localname": "BalanceSheetLocationAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BalanceSheetLocationDomain": {
     "auth_ref": [
      "r228",
      "r229"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Location in the balance sheet (statement of financial position).",
        "label": "Balance Sheet Location [Domain]",
        "terseLabel": "Balance Sheet Location [Domain]"
       }
      }
     },
     "localname": "BalanceSheetLocationDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_BasisOfAccountingPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy for basis of accounting, or basis of presentation, used to prepare the financial statements (for example, US Generally Accepted Accounting Principles, Other Comprehensive Basis of Accounting, IFRS).",
        "label": "Basis of Accounting, Policy [Policy Text Block]",
        "terseLabel": "Financial Statement Presentation"
       }
      }
     },
     "localname": "BasisOfAccountingPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_BusinessAcquisitionAcquireeDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Identification of the acquiree in a material business combination (or series of individually immaterial business combinations), which may include the name or other type of identification of the acquiree.",
        "label": "Business Acquisition Acquiree [Domain]",
        "terseLabel": "Business Acquisition, Acquiree [Domain]"
       }
      }
     },
     "localname": "BusinessAcquisitionAcquireeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_BusinessAcquisitionAxis": {
     "auth_ref": [
      "r218",
      "r219"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by business combination or series of individually immaterial business combinations.",
        "label": "Business Acquisition [Axis]"
       }
      }
     },
     "localname": "BusinessAcquisitionAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BusinessAcquisitionContingentConsiderationLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Business Acquisition, Contingent Consideration [Line Items]",
        "terseLabel": "Contingent Consideration"
       }
      }
     },
     "localname": "BusinessAcquisitionContingentConsiderationLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BusinessAcquisitionLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Business Acquisition [Line Items]",
        "terseLabel": "Business Combinations"
       }
      }
     },
     "localname": "BusinessAcquisitionLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BusinessCombinationAcquisitionRelatedCosts": {
     "auth_ref": [
      "r217"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "This element represents acquisition-related costs incurred to effect a business combination which costs have been expensed during the period. Such costs include finder's fees; advisory, legal, accounting, valuation, and other professional or consulting fees; general administrative costs, including the costs of maintaining an internal acquisitions department; and may include costs of registering and issuing debt and equity securities.",
        "label": "Business Combination, Acquisition Related Costs",
        "terseLabel": "Acquisition related costs"
       }
      }
     },
     "localname": "BusinessCombinationAcquisitionRelatedCosts",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_BusinessCombinationConsiderationTransferred1": {
     "auth_ref": [
      "r220",
      "r221",
      "r222"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of consideration transferred, consisting of acquisition-date fair value of assets transferred by the acquirer, liabilities incurred by the acquirer, and equity interest issued by the acquirer.",
        "label": "Business Combination, Consideration Transferred",
        "terseLabel": "Purchase price"
       }
      }
     },
     "localname": "BusinessCombinationConsiderationTransferred1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh": {
     "auth_ref": [
      "r224"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For contingent consideration arrangements recognized in connection with a business combination, this element represents an estimate of the high-end of the potential range (undiscounted) of the consideration which may be paid.",
        "label": "Business Combination, Contingent Consideration Arrangements, Range of Outcomes, Value, High",
        "terseLabel": "Contingent consideration, high end of range"
       }
      }
     },
     "localname": "BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueHigh",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueLow": {
     "auth_ref": [
      "r224"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For contingent consideration arrangements and indemnification assets recognized in connection with a business combination, this element represents an estimate of the low-end of the potential range (undiscounted) of the consideration which may be paid.",
        "label": "Business Combination, Contingent Consideration Arrangements, Range of Outcomes, Value, Low",
        "terseLabel": "Contingent consideration, low end of range"
       }
      }
     },
     "localname": "BusinessCombinationContingentConsiderationArrangementsRangeOfOutcomesValueLow",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInput": {
     "auth_ref": [
      "r234"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Value of input used to measure contingent consideration liability from business combination.",
        "label": "Business Combination, Contingent Consideration, Liability, Measurement Input",
        "terseLabel": "Discount rate (as a percent)"
       }
      }
     },
     "localname": "BusinessCombinationContingentConsiderationLiabilityMeasurementInput",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "decimalItemType"
    },
    "us-gaap_BusinessCombinationContingentConsiderationLiabilityMeasurementInputExtensibleList": {
     "auth_ref": [
      "r233"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicates measurement input for business combination contingent consideration liability.",
        "label": "Business Combination, Contingent Consideration, Liability, Measurement Input [Extensible List]"
       }
      }
     },
     "localname": "BusinessCombinationContingentConsiderationLiabilityMeasurementInputExtensibleList",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "extensibleListItemType"
    },
    "us-gaap_BusinessCombinationDisclosureTextBlock": {
     "auth_ref": [
      "r226"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for a business combination (or series of individually immaterial business combinations) completed during the period, including background, timing, and recognized assets and liabilities. The disclosure may include leverage buyout transactions (as applicable).",
        "label": "Business Combination Disclosure [Text Block]",
        "terseLabel": "Business Combinations"
       }
      }
     },
     "localname": "BusinessCombinationDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinations"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_BusinessCombinationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Business Combinations"
       }
      }
     },
     "localname": "BusinessCombinationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_BusinessDescriptionAndBasisOfPresentationTextBlock": {
     "auth_ref": [
      "r1",
      "r83",
      "r100"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for the business description and basis of presentation concepts.  Business description describes the nature and type of organization including but not limited to organizational structure as may be applicable to holding companies, parent and subsidiary relationships, business divisions, business units, business segments, affiliates and information about significant ownership of the reporting entity.  Basis of presentation describes the underlying basis used to prepare the financial statements (for example, US Generally Accepted Accounting Principles, Other Comprehensive Basis of Accounting, IFRS).",
        "label": "Business Description and Basis of Presentation [Text Block]",
        "terseLabel": "Basis of Presentation"
       }
      }
     },
     "localname": "BusinessDescriptionAndBasisOfPresentationTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBasisOfPresentation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CapitalExpendituresIncurredButNotYetPaid": {
     "auth_ref": [
      "r75",
      "r76",
      "r77"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Future cash outflow to pay for purchases of fixed assets that have occurred.",
        "label": "Capital Expenditures Incurred but Not yet Paid",
        "terseLabel": "Accruals for property and equipment"
       }
      }
     },
     "localname": "CapitalExpendituresIncurredButNotYetPaid",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsAtCarryingValue": {
     "auth_ref": [
      "r2",
      "r26",
      "r74"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates. Excludes cash and cash equivalents within disposal group and discontinued operation.",
        "label": "Cash and Cash Equivalents, at Carrying Value",
        "periodEndLabel": "End of period",
        "periodStartLabel": "Beginning of period",
        "terseLabel": "Cash and cash equivalents"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAtCarryingValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsPeriodIncreaseDecreaseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Cash and Cash Equivalents, Period Increase (Decrease) [Abstract]",
        "terseLabel": "Cash and Cash Equivalents"
       }
      }
     },
     "localname": "CashAndCashEquivalentsPeriodIncreaseDecreaseAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect": {
     "auth_ref": [
      "r69",
      "r243"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in cash, cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; including effect from exchange rate change. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash and Cash Equivalents, Period Increase (Decrease)",
        "totalLabel": "Increase for the period"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommitmentsAndContingencies": {
     "auth_ref": [
      "r39",
      "r145",
      "r276",
      "r290"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents the caption on the face of the balance sheet to indicate that the entity has entered into (1) purchase or supply arrangements that will require expending a portion of its resources to meet the terms thereof, and (2) is exposed to potential losses or, less frequently, gains, arising from (a) possible claims against a company's resources due to future performance under contract terms, and (b) possible losses or likely gains from uncertainties that will ultimately be resolved when one or more future events that are deemed likely to occur do occur or fail to occur.",
        "label": "Commitments and Contingencies",
        "terseLabel": "Commitments and contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingencies",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Other Commitments and Contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureTextBlock": {
     "auth_ref": [
      "r144",
      "r147"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for commitments and contingencies.",
        "label": "Commitments and Contingencies Disclosure [Text Block]",
        "terseLabel": "Other Commitments and Contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureOtherCommitmentsAndContingencies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CommonStockMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Stock that is subordinate to all other stock of the issuer.",
        "label": "Common Stock [Member]",
        "terseLabel": "Common Stock"
       }
      }
     },
     "localname": "CommonStockMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r16"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Face amount or stated value per share of common stock.",
        "label": "Common Stock, Par Value (in dollars per share)",
        "terseLabel": "Common stock, par value (in dollars per share)"
       }
      }
     },
     "localname": "CommonStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquityParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_CommonStockSharesAuthorized": {
     "auth_ref": [
      "r16"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The maximum number of common shares permitted to be issued by an entity's charter and bylaws.",
        "label": "Common Stock, Shares Authorized",
        "terseLabel": "Common stock, shares authorized"
       }
      }
     },
     "localname": "CommonStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesIssued": {
     "auth_ref": [
      "r16"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total number of common shares of an entity that have been sold or granted to shareholders (includes common shares that were issued, repurchased and remain in the treasury). These shares represent capital invested by the firm's shareholders and owners, and may be all or only a portion of the number of shares authorized. Shares issued include shares outstanding and shares held in the treasury.",
        "label": "Common Stock, Shares, Issued",
        "terseLabel": "Common stock, shares issued"
       }
      }
     },
     "localname": "CommonStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesOutstanding": {
     "auth_ref": [
      "r16",
      "r156"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares of common stock outstanding. Common stock represent the ownership interest in a corporation.",
        "label": "Common Stock, Shares, Outstanding",
        "terseLabel": "Common stock, shares outstanding"
       }
      }
     },
     "localname": "CommonStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockValue": {
     "auth_ref": [
      "r16"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable common stock (or common stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable common shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Common Stock, Value, Issued",
        "verboseLabel": "Common stock, $0.01 par value: 250,000,000 shares authorized; 39,021,348 shares issued and 33,102,143 outstanding at June 30, 2020, and 38,884,530 shares issued and 33,489,769 outstanding at December 31, 2019"
       }
      }
     },
     "localname": "CommonStockValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetAndLiabilityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Contract with Customer, Asset and Liability [Abstract]",
        "terseLabel": "Contract assets and contract liabilities with customers:"
       }
      }
     },
     "localname": "ContractWithCustomerAssetAndLiabilityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ContractWithCustomerAssetAndLiabilityTableTextBlock": {
     "auth_ref": [
      "r167"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of contract balances and changes in contract balances.",
        "label": "Contract with Customer, Asset and Liability [Table Text Block]",
        "verboseLabel": "Schedule of contract assets and contract liabilities with customers"
       }
      }
     },
     "localname": "ContractWithCustomerAssetAndLiabilityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ContractWithCustomerAssetNetCurrent": {
     "auth_ref": [
      "r164",
      "r166",
      "r170"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time, classified as current.",
        "label": "Contract with Customer, Asset, Net, Current",
        "terseLabel": "Receivables, unbilled"
       }
      }
     },
     "localname": "ContractWithCustomerAssetNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetNetCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Contract with Customer, Asset, Net, Current [Abstract]",
        "terseLabel": "Contract Assets"
       }
      }
     },
     "localname": "ContractWithCustomerAssetNetCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Contract with Customer, Liability [Abstract]",
        "terseLabel": "Contract Liabilities"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCurrent": {
     "auth_ref": [
      "r164",
      "r165",
      "r170"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "bld_AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable, classified as current.",
        "label": "Contract with Customer, Liability, Current",
        "terseLabel": "Deferred revenue"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails",
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CorporateNonSegmentMember": {
     "auth_ref": [
      "r110"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Corporate headquarters or functional department that may not earn revenues or may earn revenues that are only incidental to the activities of the entity and is not considered an operating segment.",
        "label": "Corporate Non Segment [Member]",
        "terseLabel": "Corporate"
       }
      }
     },
     "localname": "CorporateNonSegmentMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CostOfGoodsAndServicesSold": {
     "auth_ref": [
      "r54"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_GrossProfit",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate costs related to goods produced and sold and services rendered by an entity during the reporting period. This excludes costs incurred during the reporting period related to financial services rendered and other revenue generating activities.",
        "label": "Cost of Goods and Services Sold",
        "terseLabel": "Cost of sales"
       }
      }
     },
     "localname": "CostOfGoodsAndServicesSold",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CreditFacilityAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of credit facility. Credit facilities provide capital to borrowers without the need to structure a loan for each borrowing.",
        "label": "Credit Facility [Axis]"
       }
      }
     },
     "localname": "CreditFacilityAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CreditFacilityDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Type of credit facility. Credit facilities provide capital to borrowers without the need to structure a loan for each borrowing.",
        "label": "Credit Facility [Domain]",
        "terseLabel": "Credit Facility [Domain]"
       }
      }
     },
     "localname": "CreditFacilityDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after tax of increase (decrease) to equity or (increase) decrease to net assets, resulting from the cumulative effect adjustment of a new accounting principle applied in the period of adoption.",
        "label": "Cumulative Effect of New Accounting Principle in Period of Adoption",
        "terseLabel": "Cumulative adjustment to retained earnings on adoption of new accounting principle",
        "verboseLabel": "Cumulative-effect of accounting change"
       }
      }
     },
     "localname": "CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Long-Term Debt"
       }
      }
     },
     "localname": "DebtDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentAxis": {
     "auth_ref": [
      "r12",
      "r13",
      "r14",
      "r272",
      "r274",
      "r283"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of debt instrument, including, but not limited to, draws against credit facilities.",
        "label": "Debt Instrument [Axis]"
       }
      }
     },
     "localname": "DebtInstrumentAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentBasisSpreadOnVariableRate1": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage points added to the reference rate to compute the variable rate on the debt instrument.",
        "label": "Debt Instrument, Basis Spread on Variable Rate",
        "terseLabel": "Basis spread"
       }
      }
     },
     "localname": "DebtInstrumentBasisSpreadOnVariableRate1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtInstrumentCarryingAmount": {
     "auth_ref": [
      "r14",
      "r150",
      "r274",
      "r283"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LongTermDebt",
       "weight": 1.0
      },
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, before unamortized (discount) premium and debt issuance costs, of long-term debt. Includes, but is not limited to, notes payable, bonds payable, commercial loans, mortgage loans, convertible debt, subordinated debt and other types of debt.",
        "label": "Long-term Debt, Gross",
        "terseLabel": "Amount outstanding",
        "totalLabel": "Total principal maturities",
        "verboseLabel": "Long-term debt"
       }
      }
     },
     "localname": "DebtInstrumentCarryingAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentFaceAmount": {
     "auth_ref": [
      "r246",
      "r248"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Face (par) amount of debt instrument at time of issuance.",
        "label": "Debt Instrument, Face Amount",
        "terseLabel": "Principal amount of debt"
       }
      }
     },
     "localname": "DebtInstrumentFaceAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentFairValue": {
     "auth_ref": [
      "r242"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value portion of debt instrument payable, including, but not limited to, notes payable and loans payable.",
        "label": "Debt Instrument, Fair Value Disclosure",
        "terseLabel": "Fair value"
       }
      }
     },
     "localname": "DebtInstrumentFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentInterestRateEffectivePercentage": {
     "auth_ref": [
      "r35",
      "r152",
      "r246"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Effective interest rate for the funds borrowed under the debt agreement considering interest compounding and original issue discount or premium.",
        "label": "Debt Instrument, Interest Rate, Effective Percentage",
        "terseLabel": "Interest rate"
       }
      }
     },
     "localname": "DebtInstrumentInterestRateEffectivePercentage",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtInstrumentInterestRateStatedPercentage": {
     "auth_ref": [
      "r35"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Contractual interest rate for funds borrowed, under the debt agreement.",
        "label": "Debt Instrument, Interest Rate, Stated Percentage",
        "terseLabel": "Interest rate (as a percent)"
       }
      }
     },
     "localname": "DebtInstrumentInterestRateStatedPercentage",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtInstrumentLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Debt Instrument [Line Items]",
        "terseLabel": "Long-Term Debt"
       }
      }
     },
     "localname": "DebtInstrumentLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentMaturityDate": {
     "auth_ref": [
      "r36",
      "r234"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Date when the debt instrument is scheduled to be fully repaid, in CCYY-MM-DD format.",
        "label": "Debt Instrument, Maturity Date",
        "terseLabel": "Scheduled maturity date"
       }
      }
     },
     "localname": "DebtInstrumentMaturityDate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "dateItemType"
    },
    "us-gaap_DebtInstrumentNameDomain": {
     "auth_ref": [
      "r37"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The name for the particular debt instrument or borrowing that distinguishes it from other debt instruments or borrowings, including draws against credit facilities.",
        "label": "Debt Instrument Name [Domain]",
        "terseLabel": "Debt Instrument, Name [Domain]"
       }
      }
     },
     "localname": "DebtInstrumentNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DebtInstrumentRedemptionPricePercentage": {
     "auth_ref": [
      "r281"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage price of original principal amount of debt at which debt can be redeemed by the issuer.",
        "label": "Debt Instrument, Redemption Price, Percentage",
        "terseLabel": "Redemption price as a percentage of principal"
       }
      }
     },
     "localname": "DebtInstrumentRedemptionPricePercentage",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtInstrumentTable": {
     "auth_ref": [
      "r37",
      "r79",
      "r157",
      "r158",
      "r159",
      "r160",
      "r245",
      "r246",
      "r248",
      "r282"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table or schedule providing information pertaining to long-term debt instruments or arrangements, including identification, terms, features, collateral requirements and other information necessary to a fair presentation. These are debt arrangements that originally required repayment more than twelve months after issuance or greater than the normal operating cycle of the company, if longer.",
        "label": "Schedule of Long-term Debt Instruments [Table]"
       }
      }
     },
     "localname": "DebtInstrumentTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DebtInstrumentTerm": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Period of time between issuance and maturity of debt instrument, in PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Debt Instrument, Term",
        "terseLabel": "Debt term"
       }
      }
     },
     "localname": "DebtInstrumentTerm",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_DeferredFinanceCostsNet": {
     "auth_ref": [
      "r27",
      "r247"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LongTermDebt",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after accumulated amortization, of debt issuance costs. Includes, but is not limited to, legal, accounting, underwriting, printing, and registration costs.",
        "label": "Deferred Finance Costs, Net",
        "negatedLabel": "Unamortized debt issuance costs"
       }
      }
     },
     "localname": "DeferredFinanceCostsNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredIncomeTaxAssetsNet": {
     "auth_ref": [
      "r214"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, with jurisdictional netting.",
        "label": "Deferred Tax Assets, Net, Noncurrent",
        "terseLabel": "Deferred tax assets, net",
        "verboseLabel": "Net long-term deferred tax assets"
       }
      }
     },
     "localname": "DeferredIncomeTaxAssetsNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomeTaxesDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredIncomeTaxLiabilitiesNet": {
     "auth_ref": [
      "r211",
      "r214"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences with jurisdictional netting.",
        "label": "Deferred Tax Liabilities, Net, Noncurrent",
        "terseLabel": "Deferred tax liabilities, net",
        "verboseLabel": "Net long-term deferred tax liabilities"
       }
      }
     },
     "localname": "DeferredIncomeTaxLiabilitiesNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomeTaxesDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxLiabilities": {
     "auth_ref": [
      "r211",
      "r214"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences without jurisdictional netting.",
        "label": "Deferred Tax Liabilities, Net",
        "terseLabel": "Net deferred tax liability"
       }
      }
     },
     "localname": "DeferredTaxLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DepreciationDepletionAndAmortization": {
     "auth_ref": [
      "r72",
      "r104"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate expense recognized in the current period that allocates the cost of tangible assets, intangible assets, or depleting assets to periods that benefit from use of the assets.",
        "label": "Depreciation, Depletion and Amortization",
        "terseLabel": "Depreciation and amortization"
       }
      }
     },
     "localname": "DepreciationDepletionAndAmortization",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DisaggregationOfRevenueLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Disaggregation of Revenue [Line Items]",
        "terseLabel": "Revenue Recognition"
       }
      }
     },
     "localname": "DisaggregationOfRevenueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTableTextBlock": {
     "auth_ref": [
      "r169"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table Text Block]",
        "terseLabel": "Schedule of revenues disaggregated by market and product"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock": {
     "auth_ref": [
      "r210"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for share-based payment arrangement.",
        "label": "Disclosure of Compensation Related Costs, Share-based Payments [Text Block]",
        "terseLabel": "Share-Based Compensation"
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share-Based Compensation."
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Income Per Share",
        "verboseLabel": "Net income per common share:"
       }
      }
     },
     "localname": "EarningsPerShareAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareBasic": {
     "auth_ref": [
      "r49",
      "r85",
      "r92",
      "r93",
      "r94",
      "r95",
      "r98",
      "r279",
      "r292"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of net income (loss) for the period per each share of common stock or unit outstanding during the reporting period.",
        "label": "Earnings Per Share, Basic",
        "terseLabel": "Basic (in dollars per share)",
        "verboseLabel": "Basic net income per common share"
       }
      }
     },
     "localname": "EarningsPerShareBasic",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareBasicAndDilutedOtherDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Earnings Per Share, Basic and Diluted, Other Disclosures [Abstract]",
        "verboseLabel": "Weighted average shares outstanding:"
       }
      }
     },
     "localname": "EarningsPerShareBasicAndDilutedOtherDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareDiluted": {
     "auth_ref": [
      "r49",
      "r85",
      "r92",
      "r93",
      "r94",
      "r95",
      "r98",
      "r279",
      "r292"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount of net income (loss) for the period available to each share of common stock or common unit outstanding during the reporting period and to each share or unit that would have been outstanding assuming the issuance of common shares or units for all dilutive potential common shares or units outstanding during the reporting period.",
        "label": "Earnings Per Share, Diluted",
        "terseLabel": "Diluted (in dollars per share)",
        "verboseLabel": "Diluted net income per common share"
       }
      }
     },
     "localname": "EarningsPerShareDiluted",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareTextBlock": {
     "auth_ref": [
      "r99"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for earnings per share.",
        "label": "Earnings Per Share [Text Block]",
        "terseLabel": "Net Income Per Share"
       }
      }
     },
     "localname": "EarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShare"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_EffectiveIncomeTaxRateContinuingOperations": {
     "auth_ref": [
      "r80",
      "r212",
      "r213"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Percentage of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations.",
        "label": "Effective Income Tax Rate Reconciliation, Percent",
        "terseLabel": "Effective tax rate (as a percent)"
       }
      }
     },
     "localname": "EffectiveIncomeTaxRateContinuingOperations",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomeTaxesDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_EmployeeRelatedLiabilitiesCurrent": {
     "auth_ref": [
      "r33"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "bld_AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total of the carrying values as of the balance sheet date of obligations incurred through that date and payable for obligations related to services received from employees, such as accrued salaries and bonuses, payroll taxes and fringe benefits. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Employee-related Liabilities, Current",
        "terseLabel": "Salaries, wages, and commissions"
       }
      }
     },
     "localname": "EmployeeRelatedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Compensation Cost [Line Items]",
        "terseLabel": "Share-Based Compensation"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized": {
     "auth_ref": [
      "r204"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cost not yet recognized for nonvested award under share-based payment arrangement.",
        "label": "Employee Service Share-based Compensation, Nonvested Awards, Compensation Cost Not yet Recognized",
        "totalLabel": "Total unrecognized compensation expense related to unvested awards"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Unrecognized share-based compensation expense relating to unvested awards",
        "terseLabel": "Unrecognized share-based compensation expense"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions": {
     "auth_ref": [
      "r204"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cost to be recognized for nonvested award under share-based payment arrangement. Excludes share and unit options.",
        "label": "Employee Service Share-based Compensation, Nonvested Awards, Compensation Not yet Recognized, Share-based Awards Other than Options",
        "verboseLabel": "Restricted stock awards, Unrecognized compensation expense"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions": {
     "auth_ref": [
      "r204"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cost to be recognized for option under share-based payment arrangement.",
        "label": "Employee Service Share-based Compensation, Nonvested Awards, Compensation Not yet Recognized, Stock Options",
        "verboseLabel": "Stock options, Unrecognized compensation expense"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense": {
     "auth_ref": [
      "r203"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of tax benefit for recognition of expense of award under share-based payment arrangement.",
        "label": "Employee Service Share-based Compensation, Tax Benefit from Compensation Expense",
        "terseLabel": "Income tax benefit realized",
        "verboseLabel": "Tax benefit related to share-based compensation"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomeTaxesDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeStockOptionMember": {
     "auth_ref": [
      "r201"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Share-based payment arrangement granting right, subject to vesting and other restrictions, to purchase or sell certain number of shares at predetermined price for specified period of time.",
        "label": "Employee Stock Option [Member]",
        "terseLabel": "Stock Options"
       }
      }
     },
     "localname": "EmployeeStockOptionMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share Repurchase Program"
       }
      }
     },
     "localname": "EquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EquityComponentDomain": {
     "auth_ref": [
      "r156"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Components of equity are the parts of the total Equity balance including that which is allocated to common, preferred, treasury stock, retained earnings, etc.",
        "label": "Equity Component [Domain]",
        "terseLabel": "Equity Component [Domain]"
       }
      }
     },
     "localname": "EquityComponentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable": {
     "auth_ref": [
      "r230",
      "r231",
      "r232",
      "r240"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about asset and liability measured at fair value on recurring and nonrecurring basis.",
        "label": "Fair Value Measurements, Recurring and Nonrecurring [Table]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByFairValueHierarchyLevelAxis": {
     "auth_ref": [
      "r174",
      "r175",
      "r176",
      "r231",
      "r266"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by level within fair value hierarchy and fair value measured at net asset value per share as practical expedient.",
        "label": "Fair Value Hierarchy and NAV [Axis]"
       }
      }
     },
     "localname": "FairValueByFairValueHierarchyLevelAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByLiabilityClassAxis": {
     "auth_ref": [
      "r239",
      "r240"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by class of liability.",
        "label": "Liability Class [Axis]"
       }
      }
     },
     "localname": "FairValueByLiabilityClassAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueByMeasurementFrequencyAxis": {
     "auth_ref": [
      "r230",
      "r231",
      "r233",
      "r234",
      "r241"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by measurement frequency.",
        "label": "Measurement Frequency [Axis]"
       }
      }
     },
     "localname": "FairValueByMeasurementFrequencyAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Fair Value Measurements"
       }
      }
     },
     "localname": "FairValueDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueDisclosuresTextBlock": {
     "auth_ref": [
      "r239"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for the fair value of financial instruments (as defined), including financial assets and financial liabilities (collectively, as defined), and the measurements of those instruments as well as disclosures related to the fair value of non-financial assets and liabilities. Such disclosures about the financial instruments, assets, and liabilities would include: (1) the fair value of the required items together with their carrying amounts (as appropriate); (2) for items for which it is not practicable to estimate fair value, disclosure would include: (a) information pertinent to estimating fair value (including, carrying amount, effective interest rate, and maturity, and (b) the reasons why it is not practicable to estimate fair value; (3) significant concentrations of credit risk including: (a) information about the activity, region, or economic characteristics identifying a concentration, (b) the maximum amount of loss the entity is exposed to based on the gross fair value of the related item, (c) policy for requiring collateral or other security and information as to accessing such collateral or security, and (d) the nature and brief description of such collateral or security; (4) quantitative information about market risks and how such risks are managed; (5) for items measured on both a recurring and nonrecurring basis information regarding the inputs used to develop the fair value measurement; and (6) for items presented in the financial statement for which fair value measurement is elected: (a) information necessary to understand the reasons for the election, (b) discussion of the effect of fair value changes on earnings, (c) a description of [similar groups] items for which the election is made and the relation thereof to the balance sheet, the aggregate carrying value of items included in the balance sheet that are not eligible for the election; (7) all other required (as defined) and desired information.",
        "label": "Fair Value Disclosures [Text Block]",
        "terseLabel": "Fair Value Measurements"
       }
      }
     },
     "localname": "FairValueDisclosuresTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurements"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueInputsLevel1Member": {
     "auth_ref": [
      "r174",
      "r175",
      "r176",
      "r231",
      "r267"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Quoted prices in active markets for identical assets or liabilities that the reporting entity can access at the measurement date.",
        "label": "Fair Value Inputs Level1 [Member]",
        "terseLabel": "Level 1 fair value measurement"
       }
      }
     },
     "localname": "FairValueInputsLevel1Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueInputsLevel3Member": {
     "auth_ref": [
      "r174",
      "r175",
      "r176",
      "r231",
      "r268"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value Inputs Level3 [Member]",
        "terseLabel": "Level 3"
       }
      }
     },
     "localname": "FairValueInputsLevel3Member",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain": {
     "auth_ref": [
      "r235"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Represents classes of liabilities measured and disclosed at fair value.",
        "label": "Fair Value Liabilities Measured On Recurring Basis Unobservable Input Reconciliation By Liability Class [Domain]",
        "terseLabel": "Fair Value by Liability Class [Domain]"
       }
      }
     },
     "localname": "FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward]",
        "terseLabel": "Fair value of contingent consideration"
       }
      }
     },
     "localname": "FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueMeasurementFrequencyDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Measurement frequency.",
        "label": "Fair Value Measurement Frequency [Domain]",
        "terseLabel": "Measurement Frequency [Domain]"
       }
      }
     },
     "localname": "FairValueMeasurementFrequencyDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings": {
     "auth_ref": [
      "r236"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of gain (loss) recognized in income from liability measured at fair value on recurring basis using unobservable input (level 3).",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Gain (Loss) Included in Earnings",
        "verboseLabel": "Change in fair value of contingent consideration"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityPurchases": {
     "auth_ref": [
      "r237"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of purchases of financial instrument classified as a liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Purchases",
        "terseLabel": "Additions"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityPurchases",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements": {
     "auth_ref": [
      "r237"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of settlements of financial instrument classified as a liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Settlements",
        "negatedLabel": "Payment of contingent consideration"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue": {
     "auth_ref": [
      "r235"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Fair value of financial instrument classified as a liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Measurement with Unobservable Inputs Reconciliations, Recurring Basis, Liability Value",
        "periodEndLabel": "Liability balance for contingent consideration at end of period",
        "periodStartLabel": "Contingent consideration at beginning of period"
       }
      }
     },
     "localname": "FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueMeasurementsFairValueHierarchyDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Categories used to prioritize the inputs to valuation techniques to measure fair value.",
        "label": "Fair Value Measurements Fair Value Hierarchy [Domain]",
        "terseLabel": "Fair Value Hierarchy and NAV [Domain]"
       }
      }
     },
     "localname": "FairValueMeasurementsFairValueHierarchyDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementsNonrecurringMember": {
     "auth_ref": [
      "r230",
      "r231",
      "r233",
      "r234",
      "r238",
      "r241"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Infrequent fair value measurement. Includes, but is not limited to, fair value adjustment for impairment of asset, liability or equity, not frequently measured at fair value.",
        "label": "Fair Value Measurements Nonrecurring [Member]",
        "terseLabel": "Fair Value on Non-Recurring Basis"
       }
      }
     },
     "localname": "FairValueMeasurementsNonrecurringMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueTransfersBetweenLevel1AndLevel2DescriptionAndPolicyAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Fair Value, Transfers Between Level 1 and Level 2, Description and Policy [Abstract]",
        "terseLabel": "Fair Value on Non-Recurring Basis"
       }
      }
     },
     "localname": "FairValueTransfersBetweenLevel1AndLevel2DescriptionAndPolicyAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization": {
     "auth_ref": [
      "r137"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_FiniteLivedIntangibleAssetsNet",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Accumulated amount of amortization of assets, excluding financial assets and goodwill, lacking physical substance with a finite life.",
        "label": "Finite-Lived Intangible Assets, Accumulated Amortization",
        "negatedLabel": "Accumulated Amortization"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAccumulatedAmortization",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of amortization expense of assets, excluding financial assets, that lack physical substance, having a limited useful life.",
        "label": "Finite-lived Intangible Assets Amortization Expense [Table Text Block]",
        "terseLabel": "Schedule of amortization expense"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsAmortizationExpenseTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsGross": {
     "auth_ref": [
      "r137",
      "r269"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_FiniteLivedIntangibleAssetsNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before amortization of assets, excluding financial assets and goodwill, lacking physical substance with a finite life.",
        "label": "Finite-Lived Intangible Assets, Gross",
        "terseLabel": "Gross Definite-lived intangible assets"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FiniteLivedIntangibleAssetsNet": {
     "auth_ref": [
      "r137"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_IntangibleAssetsNetExcludingGoodwill",
       "weight": 1.0
      },
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after amortization of assets, excluding financial assets and goodwill, lacking physical substance with a finite life.",
        "label": "Finite-Lived Intangible Assets, Net",
        "totalLabel": "Net definite-lived intangible assets",
        "verboseLabel": "Other intangible assets, net"
       }
      }
     },
     "localname": "FiniteLivedIntangibleAssetsNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GainLossOnSaleOfPropertyPlantEquipment": {
     "auth_ref": [
      "r72"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of gain (loss) on sale or disposal of property, plant and equipment assets, including oil and gas property and timber property.",
        "label": "Gain (Loss) on Disposition of Property Plant Equipment",
        "negatedLabel": "Loss on sale or abandonment of property and equipment"
       }
      }
     },
     "localname": "GainLossOnSaleOfPropertyPlantEquipment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GainsLossesOnExtinguishmentOfDebt": {
     "auth_ref": [
      "r72",
      "r153",
      "r154"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      },
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_NonoperatingIncomeExpense",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Difference between the fair value of payments made and the carrying amount of debt which is extinguished prior to maturity.",
        "label": "Gain (Loss) on Extinguishment of Debt",
        "negatedLabel": "Loss on extinguishment of debt",
        "terseLabel": "Loss on extinguishment of debt"
       }
      }
     },
     "localname": "GainsLossesOnExtinguishmentOfDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Goodwill": {
     "auth_ref": [
      "r124",
      "r126"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill",
        "terseLabel": "Goodwill",
        "totalLabel": "Net Goodwill"
       }
      }
     },
     "localname": "Goodwill",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillAcquiredDuringPeriod": {
     "auth_ref": [
      "r128"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase in asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized resulting from a business combination.",
        "label": "Goodwill, Acquired During Period",
        "terseLabel": "Additions",
        "verboseLabel": "Goodwill recognized"
       }
      }
     },
     "localname": "GoodwillAcquiredDuringPeriod",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails",
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillAndIntangibleAssetsDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Goodwill and Other Intangibles"
       }
      }
     },
     "localname": "GoodwillAndIntangibleAssetsDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_GoodwillAndIntangibleAssetsDisclosureTextBlock": {
     "auth_ref": [
      "r139"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for goodwill and intangible assets.",
        "label": "Goodwill and Intangible Assets Disclosure [Text Block]",
        "terseLabel": "Goodwill and Other Intangibles"
       }
      }
     },
     "localname": "GoodwillAndIntangibleAssetsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangibles"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_GoodwillGross": {
     "auth_ref": [
      "r127",
      "r130"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_Goodwill",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount before accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Gross",
        "periodEndLabel": "Gross Goodwill, at end of period",
        "periodStartLabel": "Gross Goodwill, at beginning of period"
       }
      }
     },
     "localname": "GoodwillGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillImpairedAccumulatedImpairmentLoss": {
     "auth_ref": [
      "r127",
      "r130"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_Goodwill",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated impairment loss for an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Impaired, Accumulated Impairment Loss",
        "negatedLabel": "Accumulated Impairment Losses"
       }
      }
     },
     "localname": "GoodwillImpairedAccumulatedImpairmentLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillImpairmentLoss": {
     "auth_ref": [
      "r72",
      "r125",
      "r129",
      "r132"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of loss from the write-down of an asset representing the future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill, Impairment Loss",
        "terseLabel": "Impairment of goodwill"
       }
      }
     },
     "localname": "GoodwillImpairmentLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Goodwill [Line Items]",
        "terseLabel": "Changes in the carrying amount of goodwill"
       }
      }
     },
     "localname": "GoodwillLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_GrossProfit": {
     "auth_ref": [
      "r52"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate revenue less cost of goods and services sold or operating expenses directly attributable to the revenue generation activity.",
        "label": "Gross Profit",
        "totalLabel": "Gross profit"
       }
      }
     },
     "localname": "GrossProfit",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperations": {
     "auth_ref": [
      "r53",
      "r73",
      "r95",
      "r227"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_NetIncomeLoss",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after tax of income (loss) from continuing operations attributable to the parent.",
        "label": "Income (Loss) from Continuing Operations Attributable to Parent",
        "totalLabel": "Income from continuing operations",
        "verboseLabel": "Income from continuing operations"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperations",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest": {
     "auth_ref": [
      "r47",
      "r85",
      "r270",
      "r277",
      "r293"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperations",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of income (loss) from continuing operations, including income (loss) from equity method investments, before deduction of income tax expense (benefit), and income (loss) attributable to noncontrolling interest.",
        "label": "Income (Loss) from Continuing Operations before Income Taxes, Extraordinary Items, Noncontrolling Interest",
        "totalLabel": "Income before income taxes"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeStatementAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS"
       }
      }
     },
     "localname": "IncomeStatementAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeTaxDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Income Taxes"
       }
      }
     },
     "localname": "IncomeTaxDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeTaxDisclosureTextBlock": {
     "auth_ref": [
      "r216"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for income taxes. Disclosures may include net deferred tax liability or asset recognized in an enterprise's statement of financial position, net change during the year in the total valuation allowance, approximate tax effect of each type of temporary difference and carryforward that gives rise to a significant portion of deferred tax liabilities and deferred tax assets, utilization of a tax carryback, and tax uncertainties information.",
        "label": "Income Tax Disclosure [Text Block]",
        "terseLabel": "Income Taxes"
       }
      }
     },
     "localname": "IncomeTaxDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomeTaxes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_IncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r78",
      "r105",
      "r215"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperations",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations.",
        "label": "Income Tax Expense (Benefit)",
        "negatedLabel": "Income tax expense"
       }
      }
     },
     "localname": "IncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsPayable": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 13.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business.",
        "label": "Increase (Decrease) in Accounts Payable",
        "terseLabel": "Accounts payable"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsPayable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsReceivable": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 10.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in amount due within one year (or one business cycle) from customers for the credit sale of goods and services.",
        "label": "Increase (Decrease) in Accounts Receivable",
        "negatedLabel": "Receivables, net"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsReceivable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccruedLiabilities": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 14.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of expenses incurred but not yet paid.",
        "label": "Increase (Decrease) in Accrued Liabilities",
        "terseLabel": "Accrued liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccruedLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInDeferredIncomeTaxes": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 15.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the account that represents the temporary difference that results from Income or Loss that is recognized for accounting purposes but not for tax purposes and vice versa.",
        "label": "Increase (Decrease) in Deferred Income Taxes",
        "negatedLabel": "Deferred income taxes, net"
       }
      }
     },
     "localname": "IncreaseDecreaseInDeferredIncomeTaxes",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInInventories": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 11.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate value of all inventory held by the reporting entity, associated with underlying transactions that are classified as operating activities.",
        "label": "Increase (Decrease) in Inventories",
        "negatedLabel": "Inventories, net"
       }
      }
     },
     "localname": "IncreaseDecreaseInInventories",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOperatingCapitalAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Increase (Decrease) in Operating Capital [Abstract]",
        "terseLabel": "Change in certain assets and liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInOperatingCapitalAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 12.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase (decrease) in prepaid expenses, and assets classified as other.",
        "label": "Increase (Decrease) in Prepaid Expense and Other Assets",
        "negatedLabel": "Prepaid expenses and other current assets"
       }
      }
     },
     "localname": "IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInStockholdersEquityRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Increase (Decrease) in Stockholders' Equity [Roll Forward]",
        "terseLabel": "Increase (Decrease) in Stockholders' Equity"
       }
      }
     },
     "localname": "IncreaseDecreaseInStockholdersEquityRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IntangibleAssetsNetExcludingGoodwill": {
     "auth_ref": [
      "r134",
      "r136"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying amounts of all intangible assets, excluding goodwill, as of the balance sheet date, net of accumulated amortization and impairment charges.",
        "label": "Intangible Assets, Net (Excluding Goodwill)",
        "totalLabel": "Other intangible assets, net"
       }
      }
     },
     "localname": "IntangibleAssetsNetExcludingGoodwill",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IntangibleAssetsNetExcludingGoodwillAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Finite-Lived Intangible Assets, Net [Abstract]",
        "terseLabel": "Other intangible assets"
       }
      }
     },
     "localname": "IntangibleAssetsNetExcludingGoodwillAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesOtherIntangibleAssetsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InterestExpense": {
     "auth_ref": [
      "r46",
      "r103",
      "r244",
      "r247",
      "r280"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_NonoperatingIncomeExpense",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of the cost of borrowed funds accounted for as interest expense.",
        "label": "Interest Expense",
        "negatedLabel": "Interest expense"
       }
      }
     },
     "localname": "InterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InterestPayableCurrent": {
     "auth_ref": [
      "r8",
      "r9",
      "r33"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails": {
       "order": 4.0,
       "parentTag": "bld_AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of [accrued] interest payable on all forms of debt, including trade payables, that has been incurred and is unpaid. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Interest Payable, Current",
        "terseLabel": "Interest payable on long-term debt"
       }
      }
     },
     "localname": "InterestPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IntersegmentEliminationMember": {
     "auth_ref": [
      "r108"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Eliminating entries used in operating segment consolidation.",
        "label": "Intersegment Elimination [Member]",
        "terseLabel": "Intercompany Eliminations"
       }
      }
     },
     "localname": "IntersegmentEliminationMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InventoryNet": {
     "auth_ref": [
      "r3",
      "r42",
      "r122"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after valuation and LIFO reserves of inventory expected to be sold, or consumed within one year or operating cycle, if longer.",
        "label": "Inventory, Net",
        "terseLabel": "Inventories, net"
       }
      }
     },
     "localname": "InventoryNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryWriteDown": {
     "auth_ref": [
      "r123"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 9.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of loss from reductions in inventory due to subsequent measurement adjustments, including, but not limited to, physical deterioration, obsolescence, or changes in price levels.",
        "label": "Inventory Write-down",
        "terseLabel": "Loss from inventory obsolescence"
       }
      }
     },
     "localname": "InventoryWriteDown",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LeaseCost": {
     "auth_ref": [
      "r261",
      "r263"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lease cost recognized by lessee for lease contract.",
        "label": "Lease, Cost",
        "totalLabel": "Net lease cost"
       }
      }
     },
     "localname": "LeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LeaseCostAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Lease, Cost [Abstract]",
        "terseLabel": "Components of lease expense:"
       }
      }
     },
     "localname": "LeaseCostAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LeaseCostTableTextBlock": {
     "auth_ref": [
      "r261"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of lessee's lease cost. Includes, but is not limited to, interest expense for finance lease, amortization of right-of-use asset for finance lease, operating lease cost, short-term lease cost, variable lease cost and sublease income.",
        "label": "Lease, Cost [Table Text Block]",
        "terseLabel": "Schedule of components of lease expense"
       }
      }
     },
     "localname": "LeaseCostTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LeasesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Leases"
       }
      }
     },
     "localname": "LeasesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_LesseeOperatingLeaseExistenceOfOptionToExtend": {
     "auth_ref": [
      "r252"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicates (true false) whether lessee has option to extend operating lease.",
        "label": "Lessee, Operating Lease, Existence of Option to Extend [true false]",
        "terseLabel": "Operating lease, option to extend"
       }
      }
     },
     "localname": "LesseeOperatingLeaseExistenceOfOptionToExtend",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesTermsDetails"
     ],
     "xbrltype": "booleanItemType"
    },
    "us-gaap_LesseeOperatingLeaseExistenceOfOptionToTerminate": {
     "auth_ref": [
      "r252"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Indicates (true false) whether lessee has option to terminate operating lease.",
        "label": "Lessee, Operating Lease, Existence of Option to Terminate [true false]",
        "terseLabel": "Operating lease, option to terminate"
       }
      }
     },
     "localname": "LesseeOperatingLeaseExistenceOfOptionToTerminate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesTermsDetails"
     ],
     "xbrltype": "booleanItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock": {
     "auth_ref": [
      "r262"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of undiscounted cash flows of lessee's operating lease liability. Includes, but is not limited to, reconciliation of undiscounted cash flows to operating lease liability recognized in statement of financial position.",
        "label": "Lessee, Operating Lease, Liability, Maturity [Table Text Block]",
        "terseLabel": "Schedule of future minimum lease payments"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due",
        "totalLabel": "Total future minimum lease payments"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due after fifth fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due after Year Five",
        "terseLabel": "2025 &amp; Thereafter"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in fifth fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Five",
        "terseLabel": "2024"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in fourth fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Four",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in third fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Three",
        "terseLabel": "2022"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease, due in second fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Due Year Two",
        "terseLabel": "2021"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments for operating lease having an initial or remaining lease term in excess of one year due in remainder of fiscal year following latest fiscal year.",
        "label": "Lessee, Operating Lease, Liability, Payments, Remainder of Fiscal Year",
        "terseLabel": "2020"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount": {
     "auth_ref": [
      "r262"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": 1.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments in excess of discounted obligation for lease payments for operating lease.",
        "label": "Lessee, Operating Lease, Liability, Undiscounted Excess Amount",
        "negatedLabel": "Less: imputed interest"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityUndiscountedExcessAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeasesTextBlock": {
     "auth_ref": [
      "r264"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for operating leases of lessee. Includes, but is not limited to, description of operating lease and maturity analysis of operating lease liability.",
        "label": "Lessee, Operating Leases [Text Block]",
        "terseLabel": "Leases"
       }
      }
     },
     "localname": "LesseeOperatingLeasesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeases"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LettersOfCreditOutstandingAmount": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The total amount of the contingent obligation under letters of credit outstanding as of the reporting date.",
        "label": "Letters of Credit Outstanding, Amount",
        "negatedLabel": "Less: standby letters of credit"
       }
      }
     },
     "localname": "LettersOfCreditOutstandingAmount",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Liabilities": {
     "auth_ref": [
      "r32"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all liabilities that are recognized. Liabilities are probable future sacrifices of economic benefits arising from present obligations of an entity to transfer assets or provide services to other entities in the future.",
        "label": "Liabilities",
        "totalLabel": "Total liabilities"
       }
      }
     },
     "localname": "Liabilities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquity": {
     "auth_ref": [
      "r22",
      "r275",
      "r288"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of liabilities and equity items, including the portion of equity attributable to noncontrolling interests, if any.",
        "label": "Liabilities and Equity",
        "totalLabel": "Total liabilities and equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities and Equity [Abstract]",
        "terseLabel": "LIABILITIES AND EQUITY"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesCurrent": {
     "auth_ref": [
      "r34"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total obligations incurred as part of normal operations that are expected to be paid during the following twelve months or within one business cycle, if longer.",
        "label": "Liabilities, Current",
        "totalLabel": "Total current liabilities"
       }
      }
     },
     "localname": "LiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Liabilities, Current [Abstract]",
        "terseLabel": "Current liabilities:"
       }
      }
     },
     "localname": "LiabilitiesCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity": {
     "auth_ref": [
      "r29"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of current borrowing capacity under the credit facility considering any current restrictions on the amount that could be borrowed (for example, borrowings may be limited by the amount of current assets), but without considering any amounts currently outstanding under the facility.",
        "label": "Line of Credit Facility, Current Borrowing Capacity",
        "terseLabel": "Availability under Revolving Facility"
       }
      }
     },
     "localname": "LineOfCreditFacilityCurrentBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity": {
     "auth_ref": [
      "r29"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Maximum borrowing capacity under the credit facility without consideration of any current restrictions on the amount that could be borrowed or the amounts currently outstanding under the facility.",
        "label": "Line of Credit Facility, Maximum Borrowing Capacity",
        "totalLabel": "Revolving Facility",
        "verboseLabel": "Availability"
       }
      }
     },
     "localname": "LineOfCreditFacilityMaximumBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LineOfCreditFacilityTable": {
     "auth_ref": [
      "r29",
      "r79"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table or schedule providing information pertaining to short-term or long-term contractual arrangements with lenders, including letters of credit, standby letters of credit, and revolving credit arrangements, under which borrowings can be made up to maximum amount as of any point in time conditional on satisfaction of specified terms before, as of and after the date of drawdowns on the line.",
        "label": "Line of Credit Facility [Table]"
       }
      }
     },
     "localname": "LineOfCreditFacilityTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The fee, expressed as a percentage of the line of credit facility, for available but unused credit capacity under the credit facility.",
        "label": "Line of Credit Facility, Unused Capacity, Commitment Fee Percentage",
        "terseLabel": "Commitment fee (as a percent)"
       }
      }
     },
     "localname": "LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_LondonInterbankOfferedRateLIBORMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest rate at which a bank borrows funds from other banks in the London interbank market.",
        "label": "London Interbank Offered Rate L I B O R [Member]",
        "terseLabel": "LIBOR"
       }
      }
     },
     "localname": "LondonInterbankOfferedRateLIBORMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LongTermDebt": {
     "auth_ref": [
      "r14",
      "r151",
      "r274",
      "r286"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetailsCalc2": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after unamortized (discount) premium and debt issuance costs, of long-term debt. Includes, but not limited to, notes payable, bonds payable, debentures, mortgage loans and commercial paper. Excludes capital lease obligations.",
        "label": "Long-term Debt.",
        "totalLabel": "Total debt, net of unamortized debt issuance costs"
       }
      }
     },
     "localname": "LongTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtByMaturityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Long-term Debt, Fiscal Year Maturity [Abstract]",
        "terseLabel": "Schedule of Debt Maturity by Years:"
       }
      }
     },
     "localname": "LongTermDebtByMaturityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LongTermDebtCurrent": {
     "auth_ref": [
      "r31"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetailsCalc2": {
       "order": 1.0,
       "parentTag": "us-gaap_LongTermDebt",
       "weight": 1.0
      },
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, after unamortized (discount) premium and debt issuance costs, of long-term debt, classified as current. Includes, but not limited to, notes payable, bonds payable, debentures, mortgage loans and commercial paper. Excludes capital lease obligations.",
        "label": "Long-term Debt, Current Maturities",
        "terseLabel": "Current portion of long-term debt",
        "verboseLabel": "Less: current portion of long-term debt"
       }
      }
     },
     "localname": "LongTermDebtCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive": {
     "auth_ref": [
      "r82",
      "r148"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_DebtInstrumentCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing after the fifth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal after Year Five",
        "terseLabel": "Thereafter"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive": {
     "auth_ref": [
      "r82",
      "r148"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_DebtInstrumentCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the fifth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Year Five",
        "terseLabel": "2024"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour": {
     "auth_ref": [
      "r82",
      "r148"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_DebtInstrumentCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the fourth fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Year Four",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree": {
     "auth_ref": [
      "r82",
      "r148"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_DebtInstrumentCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the third fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Year Three",
        "terseLabel": "2022"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo": {
     "auth_ref": [
      "r82",
      "r148"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_DebtInstrumentCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the second fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal in Year Two",
        "terseLabel": "2021"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear": {
     "auth_ref": [
      "r82"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DebtInstrumentCarryingAmount",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the remainder of the fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.",
        "label": "Long-term Debt, Maturities, Repayments of Principal, Remainder of Fiscal Year",
        "terseLabel": "2020"
       }
      }
     },
     "localname": "LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtNoncurrent": {
     "auth_ref": [
      "r37"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetailsCalc2": {
       "order": 2.0,
       "parentTag": "us-gaap_LongTermDebt",
       "weight": 1.0
      },
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after unamortized (discount) premium and debt issuance costs of long-term debt classified as noncurrent and excluding amounts to be repaid within one year or the normal operating cycle, if longer. Includes, but not limited to, notes payable, bonds payable, debentures, mortgage loans and commercial paper. Excludes capital lease obligations.",
        "label": "Long-term Debt, Excluding Current Maturities",
        "terseLabel": "Long-term debt",
        "verboseLabel": "Total long-term debt"
       }
      }
     },
     "localname": "LongTermDebtNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermDebtOtherDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Long-term Debt, Other Disclosures [Abstract]",
        "terseLabel": "Debt covenants"
       }
      }
     },
     "localname": "LongTermDebtOtherDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LongTermDebtTextBlock": {
     "auth_ref": [
      "r155"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for long-term debt.",
        "label": "Long-term Debt [Text Block]",
        "terseLabel": "Long-Term Debt"
       }
      }
     },
     "localname": "LongTermDebtTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebt"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LongtermDebtTypeAxis": {
     "auth_ref": [
      "r37"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of long-term debt.",
        "label": "Long-term Debt, Type [Axis]"
       }
      }
     },
     "localname": "LongtermDebtTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LongtermDebtTypeDomain": {
     "auth_ref": [
      "r37",
      "r149"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Type of long-term debt arrangement, such as notes, line of credit, commercial paper, asset-based financing, project financing, letter of credit financing. These are debt arrangements that originally required repayment more than twelve months after issuance or greater than the normal operating cycle of the company, if longer.",
        "label": "Longterm Debt Type [Domain]",
        "terseLabel": "Long-term Debt, Type [Domain]"
       }
      }
     },
     "localname": "LongtermDebtTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivities": {
     "auth_ref": [
      "r69"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from financing activities, including discontinued operations. Financing activity cash flows include obtaining resources from owners and providing them with a return on, and a return of, their investment; borrowing money and repaying amounts borrowed, or settling the obligation; and obtaining and paying for other resources obtained from creditors on long-term credit.",
        "label": "Net Cash Provided by (Used in) Financing Activities, Continuing Operations",
        "totalLabel": "Net cash used in financing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Financing Activities, Continuing Operations [Abstract]",
        "terseLabel": "Cash Flows Provided by (Used in) Financing Activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivities": {
     "auth_ref": [
      "r69"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from investing activities, including discontinued operations. Investing activity cash flows include making and collecting loans and acquiring and disposing of debt or equity instruments and property, plant, and equipment and other productive assets.",
        "label": "Net Cash Provided by (Used in) Investing Activities, Continuing Operations",
        "totalLabel": "Net cash used in investing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Investing Activities, Continuing Operations [Abstract]",
        "terseLabel": "Cash Flows Provided by (Used in) Investing Activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivities": {
     "auth_ref": [
      "r69",
      "r70",
      "r73"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from operating activities, including discontinued operations. Operating activity cash flows include transactions, adjustments, and changes in value not defined as investing or financing activities.",
        "label": "Net Cash Provided by (Used in) Operating Activities, Continuing Operations",
        "totalLabel": "Net cash provided by operating activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Net Cash Provided by (Used in) Operating Activities, Continuing Operations [Abstract]",
        "terseLabel": "Cash Flows Provided by (Used in) Operating Activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetIncomeLoss": {
     "auth_ref": [
      "r44",
      "r45",
      "r48",
      "r73",
      "r97",
      "r278",
      "r291"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The portion of profit or loss for the period, net of income taxes, which is attributable to the parent.",
        "label": "Net Income (Loss) Attributable to Parent",
        "terseLabel": "Net income",
        "totalLabel": "Net income",
        "verboseLabel": "Net income - basic and diluted"
       }
      }
     },
     "localname": "NetIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "New Accounting Pronouncements or Change in Accounting Principle [Line Items]",
        "terseLabel": "Recently Adopted Accounting Pronouncements"
       }
      }
     },
     "localname": "NewAccountingPronouncementsOrChangeInAccountingPrincipleLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NewAccountingPronouncementsOrChangeInAccountingPrincipleTable": {
     "auth_ref": [
      "r84",
      "r86"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Summarization of the changes in an accounting principle or a new accounting pronouncement, including the line items affected by the change and the financial effects of the change on those particular line items.",
        "label": "New Accounting Pronouncements or Change in Accounting Principle [Table]"
       }
      }
     },
     "localname": "NewAccountingPronouncementsOrChangeInAccountingPrincipleTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of accounting policy pertaining to new accounting pronouncements that may impact the entity's financial reporting. Includes, but is not limited to, quantification of the expected or actual impact.",
        "label": "New Accounting Pronouncements, Policy [Policy Text Block]",
        "terseLabel": "Recently Adopted and Issued Accounting Pronouncements"
       }
      }
     },
     "localname": "NewAccountingPronouncementsPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NonoperatingIncomeExpense": {
     "auth_ref": [
      "r56"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate amount of income or expense from ancillary business-related activities (that is to say, excluding major activities considered part of the normal operations of the business).",
        "label": "Nonoperating Income (Expense)",
        "totalLabel": "Other expense, net",
        "verboseLabel": "Other expense, net"
       }
      }
     },
     "localname": "NonoperatingIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NonoperatingIncomeExpenseAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Nonoperating Income (Expense) [Abstract]",
        "terseLabel": "Other income (expense), net:"
       }
      }
     },
     "localname": "NonoperatingIncomeExpenseAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NumberOfReportableSegments": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of segments reported by the entity. A reportable segment is a component of an entity for which there is an accounting requirement to report separate financial information on that component in the entity's financial statements.",
        "label": "Number of Reportable Segments",
        "terseLabel": "Number of reportable segments"
       }
      }
     },
     "localname": "NumberOfReportableSegments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBasisOfPresentationDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_NumberOfReportingUnits": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of reporting units tested for impairment of goodwill. A reporting unit is an operating segment or one level below an operating segment.",
        "label": "Number of Reporting Units",
        "terseLabel": "Number of reporting units"
       }
      }
     },
     "localname": "NumberOfReportingUnits",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_OperatingExpenses": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Generally recurring costs associated with normal operations except for the portion of these expenses which can be clearly related to production and included in cost of sales or services. Includes selling, general and administrative expense.",
        "label": "Operating Expenses",
        "terseLabel": "General corporate expense, net"
       }
      }
     },
     "localname": "OperatingExpenses",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingIncomeLoss": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The net result for the period of deducting operating expenses from operating revenues.",
        "label": "Operating Income (Loss)",
        "totalLabel": "Operating profit",
        "verboseLabel": "Operating profit"
       }
      }
     },
     "localname": "OperatingIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseCost": {
     "auth_ref": [
      "r253",
      "r263"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of single lease cost, calculated by allocation of remaining cost of lease over remaining lease term. Includes, but is not limited to, single lease cost, after impairment of right-of-use asset, calculated by amortization of remaining right-of-use asset and accretion of lease liability.",
        "label": "Operating Lease, Cost",
        "terseLabel": "Operating lease cost"
       }
      }
     },
     "localname": "OperatingLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilitiesPaymentsDueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Operating Lease Liabilities, Payments Due [Abstract]",
        "terseLabel": "Future minimum lease payments under non-cancellable operating leases:"
       }
      }
     },
     "localname": "OperatingLeaseLiabilitiesPaymentsDueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OperatingLeaseLiability": {
     "auth_ref": [
      "r250"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetailsCalc2": {
       "order": 2.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease.",
        "label": "Operating Lease, Liability",
        "totalLabel": "Lease liability at June 30, 2020"
       }
      }
     },
     "localname": "OperatingLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesFutureMinimumLeasePaymentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityCurrent": {
     "auth_ref": [
      "r250"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as current.",
        "label": "Operating Lease, Liability, Current",
        "terseLabel": "Short-term lease liabilities"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityNoncurrent": {
     "auth_ref": [
      "r250"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as noncurrent.",
        "label": "Operating Lease, Liability, Noncurrent",
        "terseLabel": "Long-term lease liabilities"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasePayments": {
     "auth_ref": [
      "r251",
      "r257"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow from operating lease, excluding payments to bring another asset to condition and location necessary for its intended use.",
        "label": "Operating Lease, Payments",
        "negatedLabel": "Cash paid for amounts included in the measurement of lease liabilities"
       }
      }
     },
     "localname": "OperatingLeasePayments",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesCashFlowsAndOtherDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseRightOfUseAsset": {
     "auth_ref": [
      "r249"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of lessee's right to use underlying asset under operating lease.",
        "label": "Operating Lease, Right-of-Use Asset",
        "terseLabel": "Right of use assets"
       }
      }
     },
     "localname": "OperatingLeaseRightOfUseAsset",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent": {
     "auth_ref": [
      "r260",
      "r263"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average discount rate for operating lease calculated at point in time.",
        "label": "Operating Lease, Weighted Average Discount Rate, Percent",
        "terseLabel": "Weighted average discount rate (as a percent)"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageDiscountRatePercent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesCashFlowsAndOtherDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1": {
     "auth_ref": [
      "r259",
      "r263"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average remaining lease term for operating lease, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Operating Lease, Weighted Average Remaining Lease Term",
        "terseLabel": "Weighted average remaining lease term"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageRemainingLeaseTerm1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesCashFlowsAndOtherDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_OperatingSegmentsMember": {
     "auth_ref": [
      "r102",
      "r109"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Identifies components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Operating Segments [Member]",
        "terseLabel": "Operating Segment"
       }
      }
     },
     "localname": "OperatingSegmentsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Basis of Presentation"
       }
      }
     },
     "localname": "OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherAccruedLiabilitiesCurrent": {
     "auth_ref": [
      "r7",
      "r8",
      "r9",
      "r33"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails": {
       "order": 6.0,
       "parentTag": "bld_AccruedLiabilitiesAndEmployeeRelatedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expenses incurred but not yet paid classified as other, due within one year or the normal operating cycle, if longer.",
        "label": "Other Accrued Liabilities, Current",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "OtherAccruedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherAssetsNoncurrent": {
     "auth_ref": [
      "r27"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of noncurrent assets classified as other.",
        "label": "Other Assets, Noncurrent",
        "terseLabel": "Other assets"
       }
      }
     },
     "localname": "OtherAssetsNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherLiabilitiesNoncurrent": {
     "auth_ref": [
      "r38"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of liabilities classified as other, due after one year or the normal operating cycle, if longer.",
        "label": "Other Liabilities, Noncurrent",
        "terseLabel": "Other liabilities"
       }
      }
     },
     "localname": "OtherLiabilitiesNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNoncashInvestingAndFinancingItemsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Other Noncash Investing and Financing Items [Abstract]",
        "terseLabel": "Supplemental disclosure of noncash activities:"
       }
      }
     },
     "localname": "OtherNoncashInvestingAndFinancingItemsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherNonoperatingIncomeExpense": {
     "auth_ref": [
      "r57"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 3.0,
       "parentTag": "us-gaap_NonoperatingIncomeExpense",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of income (expense) related to nonoperating activities, classified as other.",
        "label": "Other Nonoperating Income (Expense)",
        "terseLabel": "Other, net"
       }
      }
     },
     "localname": "OtherNonoperatingIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherOperatingActivitiesCashFlowStatement": {
     "auth_ref": [],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 16.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Other cash or noncash adjustments to reconcile net income to cash provided by (used in) operating activities that are not separately disclosed in the statement of cash flows (for example,  cash received or cash paid during the current period for miscellaneous operating activities, net change during the reporting period in other assets or other liabilities).",
        "label": "Other Operating Activities, Cash Flow Statement",
        "terseLabel": "Other, net"
       }
      }
     },
     "localname": "OtherOperatingActivitiesCashFlowStatement",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PayablesAndAccrualsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Accrued Liabilities"
       }
      }
     },
     "localname": "PayablesAndAccrualsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities": {
     "auth_ref": [
      "r67"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow, not made soon after acquisition date of business combination, to settle contingent consideration liability up to amount recognized at acquisition date, including, but not limited to, measurement period adjustment and less amount paid soon after acquisition date.",
        "label": "Payment for Contingent Consideration Liability, Financing Activities",
        "negatedLabel": "Payment of contingent consideration"
       }
      }
     },
     "localname": "PaymentForContingentConsiderationLiabilityFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentForContingentConsiderationLiabilityOperatingActivities": {
     "auth_ref": [
      "r68"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow, not made soon after acquisition date of business combination, to settle contingent consideration liability exceeding amount recognized at acquisition date. Includes, but is not limited to, measurement period adjustment and less amount paid soon after acquisition date.",
        "label": "Payment for Contingent Consideration Liability, Operating Activities",
        "negatedLabel": "Payment of contingent consideration"
       }
      }
     },
     "localname": "PaymentForContingentConsiderationLiabilityOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForProceedsFromOtherInvestingActivities": {
     "auth_ref": [
      "r59",
      "r62",
      "r81"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash (inflow) outflow from investing activities classified as other.",
        "label": "Payments for (Proceeds from) Other Investing Activities",
        "negatedLabel": "Other, net"
       }
      }
     },
     "localname": "PaymentsForProceedsFromOtherInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsForRepurchaseOfCommonStock": {
     "auth_ref": [
      "r64"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow to reacquire common stock during the period.",
        "label": "Payments for Repurchase of Common Stock",
        "negatedLabel": "Repurchase of shares of common stock"
       }
      }
     },
     "localname": "PaymentsForRepurchaseOfCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsOfDebtIssuanceCosts": {
     "auth_ref": [
      "r66"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow paid to third parties in connection with debt origination, which will be amortized over the remaining maturity period of the associated long-term debt.",
        "label": "Payments of Debt Issuance Costs",
        "negatedLabel": "Payment of debt issuance costs"
       }
      }
     },
     "localname": "PaymentsOfDebtIssuanceCosts",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [
      "r64"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of cash outflow to satisfy grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Payments Related to Tax Withholding for Share-based Compensation",
        "negatedLabel": "Taxes withheld and paid on employees' equity awards"
       }
      }
     },
     "localname": "PaymentsRelatedToTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireBusinessesGross": {
     "auth_ref": [
      "r60",
      "r223"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow associated with the acquisition of business during the period. The cash portion only of the acquisition price.",
        "label": "Payments to Acquire Businesses, Gross",
        "verboseLabel": "Cash consideration"
       }
      }
     },
     "localname": "PaymentsToAcquireBusinessesGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails",
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired": {
     "auth_ref": [
      "r60"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow associated with the acquisition of a business, net of the cash acquired from the purchase.",
        "label": "Payments to Acquire Businesses, Net of Cash Acquired",
        "negatedTerseLabel": "Acquisition of businesses"
       }
      }
     },
     "localname": "PaymentsToAcquireBusinessesNetOfCashAcquired",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquirePropertyPlantAndEquipment": {
     "auth_ref": [
      "r61"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow associated with the acquisition of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale; includes cash outflows to pay for construction of self-constructed assets.",
        "label": "Payments to Acquire Property, Plant, and Equipment",
        "negatedLabel": "Purchases of property and equipment"
       }
      }
     },
     "localname": "PaymentsToAcquirePropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PlanNameAxis": {
     "auth_ref": [
      "r180",
      "r205"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by plan name for share-based payment arrangement.",
        "label": "Plan Name [Axis]"
       }
      }
     },
     "localname": "PlanNameAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PlanNameDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Plan name for share-based payment arrangement.",
        "label": "Plan Name [Domain]",
        "terseLabel": "Plan Name [Domain]"
       }
      }
     },
     "localname": "PlanNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PreferredStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r15"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Face amount or stated value per share of preferred stock nonredeemable or redeemable solely at the option of the issuer.",
        "label": "Preferred Stock, Par or Stated Value Per Share",
        "terseLabel": "Preferred stock, par value (in dollars per share)"
       }
      }
     },
     "localname": "PreferredStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_PreferredStockSharesAuthorized": {
     "auth_ref": [
      "r15"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The maximum number of nonredeemable preferred shares (or preferred stock redeemable solely at the option of the issuer) permitted to be issued by an entity's charter and bylaws.",
        "label": "Preferred Stock, Shares Authorized",
        "terseLabel": "Preferred stock, shares authorized"
       }
      }
     },
     "localname": "PreferredStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockSharesIssued": {
     "auth_ref": [
      "r15"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total number of nonredeemable preferred shares (or preferred stock redeemable solely at the option of the issuer) issued to shareholders (includes related preferred shares that were issued, repurchased, and remain in the treasury). May be all or portion of the number of preferred shares authorized. Excludes preferred shares that are classified as debt.",
        "label": "Preferred Stock, Shares Issued",
        "terseLabel": "Preferred stock, shares, issued"
       }
      }
     },
     "localname": "PreferredStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockSharesOutstanding": {
     "auth_ref": [
      "r15"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate share number for all nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer) held by stockholders. Does not include preferred shares that have been repurchased.",
        "label": "Preferred Stock, Shares Outstanding",
        "terseLabel": "Preferred stock, shares, outstanding"
       }
      }
     },
     "localname": "PreferredStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockValue": {
     "auth_ref": [
      "r15"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable preferred shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Preferred Stock, Value, Issued",
        "terseLabel": "Preferred stock, $0.01 par value: 10,000,000 shares authorized; 0 shares issued and outstanding at June 30, 2020 and December 31, 2019"
       }
      }
     },
     "localname": "PreferredStockValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PrepaidExpenseAndOtherAssetsCurrent": {
     "auth_ref": [
      "r5",
      "r24",
      "r25"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of asset related to consideration paid in advance for costs that provide economic benefits in future periods, and amount of other assets that are expected to be realized or consumed within one year or the normal operating cycle, if longer.",
        "label": "Prepaid Expense and Other Assets, Current",
        "terseLabel": "Prepaid expenses and other current assets"
       }
      }
     },
     "localname": "PrepaidExpenseAndOtherAssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfLongTermDebt": {
     "auth_ref": [
      "r63"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow from a debt initially having maturity due after one year or beyond the operating cycle, if longer.",
        "label": "Proceeds from Issuance of Long-term Debt",
        "terseLabel": "Proceeds from issuance of long-term debt"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfLongTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment": {
     "auth_ref": [
      "r58"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash inflow from the sale of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale.",
        "label": "Proceeds from Sale of Property, Plant, and Equipment",
        "terseLabel": "Proceeds from sale of property and equipment"
       }
      }
     },
     "localname": "ProceedsFromSaleOfPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentNet": {
     "auth_ref": [
      "r10",
      "r11",
      "r140",
      "r289"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 7.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount after accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business to produce goods and services and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Net",
        "terseLabel": "Property and equipment, net"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentNet",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProvisionForDoubtfulAccounts": {
     "auth_ref": [
      "r50",
      "r120"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of expense (reversal of expense) for expected credit loss on accounts receivable.",
        "label": "Provision for Doubtful Accounts",
        "terseLabel": "Provision for bad debt expense"
       }
      }
     },
     "localname": "ProvisionForDoubtfulAccounts",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RepaymentsOfLongTermDebt": {
     "auth_ref": [
      "r65"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cash outflow for debt initially having maturity due after one year or beyond the normal operating cycle, if longer.",
        "label": "Repayments of Long-term Debt",
        "negatedLabel": "Repayment of long-term debt"
       }
      }
     },
     "localname": "RepaymentsOfLongTermDebt",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedStockMember": {
     "auth_ref": [
      "r96"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Stock including a provision that prohibits sale or substantive sale of an equity instrument for a specified period of time or until specified performance conditions are met.",
        "label": "Restricted Stock [Member]",
        "terseLabel": "Restricted Stock Awards"
       }
      }
     },
     "localname": "RestrictedStockMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RetainedEarningsAccumulatedDeficit": {
     "auth_ref": [
      "r19",
      "r161",
      "r287"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings (Accumulated Deficit)",
        "terseLabel": "Retained earnings"
       }
      }
     },
     "localname": "RetainedEarningsAccumulatedDeficit",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings [Member]",
        "terseLabel": "Retained Earnings"
       }
      }
     },
     "localname": "RetainedEarningsMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Revenue Recognition"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax": {
     "auth_ref": [
      "r168",
      "r169"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_GrossProfit",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount, excluding tax collected from customer, of revenue from satisfaction of performance obligation by transferring promised good or service to customer. Tax collected from customer is tax assessed by governmental authority that is both imposed on and concurrent with specific revenue-producing transaction, including, but not limited to, sales, use, value added and excise.",
        "label": "Revenues",
        "terseLabel": "Net sales"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerExcludingAssessedTax",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerTextBlock": {
     "auth_ref": [
      "r173"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure of revenue from contract with customer to transfer good or service and to transfer nonfinancial asset. Includes, but is not limited to, disaggregation of revenue, credit loss recognized from contract with customer, judgment and change in judgment related to contract with customer, and asset recognized from cost incurred to obtain or fulfill contract with customer. Excludes insurance and lease contracts.",
        "label": "Revenue from Contract with Customer [Text Block]",
        "terseLabel": "Revenue Recognition"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureRevenueRecognition"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevolvingCreditFacilityMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Arrangement in which loan proceeds can continuously be obtained following repayments, but the total amount borrowed cannot exceed a specified maximum amount.",
        "label": "Revolving Credit Facility [Member]",
        "terseLabel": "Revolving Facility"
       }
      }
     },
     "localname": "RevolvingCreditFacilityMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability": {
     "auth_ref": [
      "r258",
      "r263"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of increase in right-of-use asset obtained in exchange for operating lease liability.",
        "label": "Right-of-Use Asset Obtained in Exchange for Operating Lease Liability",
        "terseLabel": "Leased assets obtained in exchange for new operating lease liabilities"
       }
      }
     },
     "localname": "RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the components of accrued liabilities.",
        "label": "Schedule of Accrued Liabilities [Table Text Block]",
        "terseLabel": "Schedule of components of accrued liabilities"
       }
      }
     },
     "localname": "ScheduleOfAccruedLiabilitiesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccruedLiabilitiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable": {
     "auth_ref": [
      "r96"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule for securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by Antidilutive Securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareAntiDilutiveCommonStockEquivalentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock": {
     "auth_ref": [
      "r96"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by antidilutive securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block]",
        "terseLabel": "Summary of shares excluded from the calculation of diluted income per share because their effect would have been anti-dilutive"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionContingentConsiderationTable": {
     "auth_ref": [
      "r225"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of information about a contingent payment arrangement including the terms that will result in payment and the accounting treatment that will be followed if such contingency occurs, including the potential impact on earnings per share if the contingency is to be settled in shares of common stock of the entity. The description also may include the period over which amounts are expected to be paid, and changes in the amount since the previous reporting period. This also includes contingent options and commitments.",
        "label": "Schedule of Business Acquisitions by Acquisition, Contingent Consideration [Table]"
       }
      }
     },
     "localname": "ScheduleOfBusinessAcquisitionsByAcquisitionContingentConsiderationTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsContingentConsiderationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionContingentConsiderationTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of contingent payment arrangements including the terms that will result in payment and the accounting treatment that will be followed if such contingencies occur, including the potential impact on earnings per share if contingencies are to be settled in common stock of the entity. The description also may include the period over which amounts are expected to be paid, and changes in the amount since the previous reporting period. This also includes contingent options and commitments.",
        "label": "Schedule of Business Acquisitions by Acquisition, Contingent Consideration [Table Text Block]",
        "terseLabel": "Schedule of fair value of contingent consideration"
       }
      }
     },
     "localname": "ScheduleOfBusinessAcquisitionsByAcquisitionContingentConsiderationTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable": {
     "auth_ref": [
      "r218",
      "r219"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule reflecting each material business combination (or series of individually immaterial business combinations) completed during the period, including background, timing, and recognized assets and liabilities.",
        "label": "Schedule of Business Acquisitions, by Acquisition [Table]"
       }
      }
     },
     "localname": "ScheduleOfBusinessAcquisitionsByAcquisitionTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureBusinessCombinationsSummaryDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfDebtTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of information pertaining to short-term and long-debt instruments or arrangements, including but not limited to identification of terms, features, collateral requirements and other information necessary to a fair presentation.",
        "label": "Schedule of Debt [Table Text Block]",
        "terseLabel": "Reconciliation of principal balance of outstanding debt"
       }
      }
     },
     "localname": "ScheduleOfDebtTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock": {
     "auth_ref": [
      "r97"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of an entity's basic and diluted earnings per share calculations, including a reconciliation of numerators and denominators of the basic and diluted per-share computations for income from continuing operations.",
        "label": "Schedule of Earnings Per Share, Basic and Diluted [Table Text Block]",
        "terseLabel": "Schedule of basic and diluted income per share"
       }
      }
     },
     "localname": "ScheduleOfEarningsPerShareBasicAndDilutedTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable": {
     "auth_ref": [
      "r179",
      "r202",
      "r207"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about amount recognized for award under share-based payment arrangement. Includes, but is not limited to, amount expensed in statement of income or comprehensive income, amount capitalized in statement of financial position, and corresponding reporting line item in financial statements.",
        "label": "Schedule of Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Table]"
       }
      }
     },
     "localname": "ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfGoodwillTable": {
     "auth_ref": [
      "r131",
      "r133"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule of goodwill and the changes during the year due to acquisition, sale, impairment or for other reasons.",
        "label": "Schedule of Goodwill [Table]"
       }
      }
     },
     "localname": "ScheduleOfGoodwillTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfGoodwillTextBlock": {
     "auth_ref": [
      "r131",
      "r133"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of goodwill by reportable segment and in total which includes a rollforward schedule.",
        "label": "Schedule of Goodwill [Table Text Block]",
        "terseLabel": "Changes in the carrying amount of goodwill by segment"
       }
      }
     },
     "localname": "ScheduleOfGoodwillTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfMaturitiesOfLongTermDebtTableTextBlock": {
     "auth_ref": [
      "r148"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the combined aggregate amount of maturities and sinking fund requirements for all long-term borrowings for each of the five years following the date of the latest balance sheet date presented.",
        "label": "Schedule of Maturities of Long-term Debt [Table Text Block]",
        "verboseLabel": "Schedule of remaining principal payments of debt"
       }
      }
     },
     "localname": "ScheduleOfMaturitiesOfLongTermDebtTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable": {
     "auth_ref": [
      "r101",
      "r106",
      "r107",
      "r108",
      "r131"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A table disclosing the profit or loss and total assets for each reportable segment of the entity. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table]"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock": {
     "auth_ref": [
      "r101",
      "r106",
      "r107",
      "r108",
      "r131"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the profit or loss and total assets for each reportable segment. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table Text Block]",
        "terseLabel": "Schedule of net sales and operating results by segment"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfShareBasedCompensationActivityTableTextBlock": {
     "auth_ref": [
      "r188",
      "r191",
      "r194"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of activity for award under share-based payment arrangement. Includes, but is not limited to, outstanding award at beginning and end of year, granted, exercised, forfeited, and weighted-average grant date fair value.",
        "label": "Schedule of Share-based Compensation, Activity [Table Text Block]",
        "terseLabel": "Schedule of share-based compensation activity"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationActivityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable": {
     "auth_ref": [
      "r180",
      "r205"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Disclosure of information about share-based payment arrangement.",
        "label": "Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table]"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfShareBasedPaymentAwardStockOptionsValuationAssumptionsTableTextBlock": {
     "auth_ref": [
      "r196"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Tabular disclosure of the significant assumptions used during the year to estimate the fair value of stock options, including, but not limited to: (a) expected term of share options and similar instruments, (b) expected volatility of the entity's shares, (c) expected dividends, (d) risk-free rate(s), and (e) discount for post-vesting restrictions.",
        "label": "Schedule of Share-based Payment Award, Stock Options, Valuation Assumptions [Table Text Block]",
        "terseLabel": "Schedule of assumptions used to estimate the fair values of options granted"
       }
      }
     },
     "localname": "ScheduleOfShareBasedPaymentAwardStockOptionsValuationAssumptionsTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SecuredDebtMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Collateralized debt obligation backed by, for example, but not limited to, pledge, mortgage or other lien on the entity's assets.",
        "label": "Secured Debt [Member]",
        "terseLabel": "Term Loan Facility"
       }
      }
     },
     "localname": "SecuredDebtMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SegmentDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Segment [Domain]",
        "terseLabel": "Segments [Domain]"
       }
      }
     },
     "localname": "SegmentDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails",
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SegmentReportingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Segment Information"
       }
      }
     },
     "localname": "SegmentReportingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingDisclosureTextBlock": {
     "auth_ref": [
      "r113"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for reporting segments including data and tables. Reportable segments include those that meet any of the following quantitative thresholds a) it's reported revenue, including sales to external customers and intersegment sales or transfers is 10 percent or more of the combined revenue, internal and external, of all operating segments b) the absolute amount of its reported profit or loss is 10 percent or more of the greater, in absolute amount of 1) the combined reported profit of all operating segments that did not report a loss or 2) the combined reported loss of all operating segments that did report a loss c) its assets are 10 percent or more of the combined assets of all operating segments.",
        "label": "Segment Reporting Disclosure [Text Block]",
        "terseLabel": "Segment Information"
       }
      }
     },
     "localname": "SegmentReportingDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SegmentReportingInformationLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Segment Reporting Information [Line Items]",
        "terseLabel": "Segment information"
       }
      }
     },
     "localname": "SegmentReportingInformationLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpense": {
     "auth_ref": [
      "r55",
      "r121"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The aggregate total costs related to selling a firm's product and services, as well as all other general and administrative expenses. Direct selling expenses (for example, credit, warranty, and advertising) are expenses that can be directly linked to the sale of specific products. Indirect selling expenses are expenses that cannot be directly linked to the sale of specific products, for example telephone expenses, Internet, and postal charges. General and administrative expenses include salaries of non-sales personnel, rent, utilities, communication, etc.",
        "label": "Selling, General and Administrative Expense",
        "terseLabel": "Selling, general, and administrative expense"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpense",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SeniorNotesMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Bond that takes priority over other debt securities sold by the issuer. In the event the issuer goes bankrupt, senior debt holders receive priority for (must receive) repayment prior to (relative to) junior and unsecured (general) creditors.",
        "label": "Senior Notes [Member]",
        "terseLabel": "Senior Notes"
       }
      }
     },
     "localname": "SeniorNotesMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureFairValueMeasurementsDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtReconciliationDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtScheduleOfDebtMaturityDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensation": {
     "auth_ref": [
      "r71"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of noncash expense for share-based payment arrangement.",
        "label": "Share-based Compensation",
        "terseLabel": "Share-based compensation"
       }
      }
     },
     "localname": "ShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Additional Disclosures [Abstract]",
        "terseLabel": "Restricted stock awards, additional disclosures"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod": {
     "auth_ref": [
      "r190"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The number of grants made during the period on other than stock (or unit) option plans (for example, phantom stock or unit plan, stock or unit appreciation rights plan, performance target plan).",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Grants in Period",
        "terseLabel": "Granted (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r190"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The weighted average fair value at grant date for nonvested equity-based awards issued during the period on other than stock (or unit) option plans (for example, phantom stock or unit plan, stock or unit appreciation rights plan, performance target plan).",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Grants in Period, Weighted Average Grant Date Fair Value",
        "terseLabel": "Granted (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber": {
     "auth_ref": [
      "r189"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The number of non-vested equity-based payment instruments, excluding stock (or unit) options, that validly exist and are outstanding as of the balance sheet date.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number",
        "periodEndLabel": "Balance at end of period (in shares)",
        "periodStartLabel": "Balance at beginning of period (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward]",
        "terseLabel": "Restricted Stock Awards, Number of Shares"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r189"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Per share or unit weighted-average fair value of nonvested award under share-based payment arrangement. Excludes share and unit options.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value",
        "periodEndLabel": "Balance at end of period (in dollars per share)",
        "periodStartLabel": "Balance at beginning of period (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract]",
        "terseLabel": "Restricted Stock Awards, Weighted Average Grant Date Fair Value Per Share"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsAndMethodologyAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions and Methodology [Abstract]",
        "terseLabel": "Assumptions used to estimate the fair values of the awards granted:"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsAndMethodologyAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate": {
     "auth_ref": [
      "r199"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The estimated dividend rate (a percentage of the share price) to be paid (expected dividends) to holders of the underlying shares over the option's term.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Dividend Rate",
        "terseLabel": "Dividend yield (as a percent)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate": {
     "auth_ref": [
      "r198"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The estimated measure of the percentage by which a share price is expected to fluctuate during a period. Volatility also may be defined as a probability-weighted measure of the dispersion of returns about the mean. The volatility of a share price is the standard deviation of the continuously compounded rates of return on the share over a specified period. That is the same as the standard deviation of the differences in the natural logarithms of the stock prices plus dividends, if any, over the period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Volatility Rate",
        "terseLabel": "Expected volatility using historical return volatility and implied volatility (as a percent)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate": {
     "auth_ref": [
      "r200"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The risk-free interest rate assumption that is used in valuing an option on its own shares.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Risk Free Interest Rate",
        "terseLabel": "Risk free interest rate (as a percent)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award [Line Items]",
        "terseLabel": "Share-Based Compensation"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized": {
     "auth_ref": [
      "r181"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares authorized for issuance under share-based payment arrangement.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Authorized",
        "terseLabel": "Number of shares authorized"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant": {
     "auth_ref": [
      "r205"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The difference between the maximum number of shares (or other type of equity) authorized for issuance under the plan (including the effects of amendments and adjustments), and the sum of: 1) the number of shares (or other type of equity) already issued upon exercise of options or other equity-based awards under the plan; and 2) shares (or other type of equity) reserved for issuance on granting of outstanding awards, net of cancellations and forfeitures, if applicable.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Available for Grant",
        "terseLabel": "Number of shares available"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationExpenseDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsAdditionalDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Additional Disclosures [Abstract]",
        "terseLabel": "Stock options, additional disclosures"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsAdditionalDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber": {
     "auth_ref": [
      "r185"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The number of shares into which fully or partially vested stock options outstanding as of the balance sheet date can be currently converted under the option plan.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Number",
        "terseLabel": "Exercisable, Number of shares"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice": {
     "auth_ref": [
      "r185"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The weighted-average price as of the balance sheet date at which grantees can acquire the shares reserved for issuance on vested portions of options outstanding and currently exercisable under the stock option plan.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Weighted Average Exercise Price",
        "terseLabel": "Exercisable Weighted Average Exercise Price Per Share"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue": {
     "auth_ref": [
      "r193"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of accumulated difference between fair value of underlying shares on dates of exercise and exercise price on options exercised (or share units converted) into shares.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period, Intrinsic Value",
        "terseLabel": "Converted/Exercised aggregate intrinsic value"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriod": {
     "auth_ref": [
      "r187"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "For presentations that combine terminations, the number of shares under options that were cancelled during the reporting period as a result of occurrence of a terminating event specified in contractual agreements pertaining to the stock option plan or that expired.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Forfeitures and Expirations in Period",
        "negatedLabel": "Forfeited/Expired (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriod",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriodWeightedAverageExercisePrice": {
     "auth_ref": [
      "r187"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average price of options that were either forfeited or expired.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Forfeitures and Expirations in Period, Weighted Average Exercise Price",
        "terseLabel": "Forfeited/Expired (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriodWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Gross number of share options (or share units) granted during the period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Grants in Period, Gross",
        "terseLabel": "Granted (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r192"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The weighted average grant-date fair value of options granted during the reporting period as calculated by applying the disclosed option pricing methodology.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Grants in Period, Weighted Average Grant Date Fair Value",
        "terseLabel": "Granted (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue": {
     "auth_ref": [
      "r205"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount by which the current fair value of the underlying stock exceeds the exercise price of options outstanding.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Intrinsic Value",
        "terseLabel": "Aggregate intrinsic value"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber": {
     "auth_ref": [
      "r184",
      "r205"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of options outstanding, including both vested and non-vested options.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Number",
        "periodEndLabel": "Balance at end of period (in shares)",
        "periodStartLabel": "Balance at beginning of period (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding [Roll Forward]",
        "terseLabel": "Stock Options, Number of Shares"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice": {
     "auth_ref": [
      "r183"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average price at which grantees can acquire the shares reserved for issuance under the stock option plan.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Exercise Price",
        "periodEndLabel": "Balance at end of period (in dollars per share)",
        "periodStartLabel": "Balance at beginning of period (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Exercise Price [Abstract]",
        "terseLabel": "Stock Options, Weighted Average Exercise Price Per Share"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain": {
     "auth_ref": [
      "r178",
      "r182"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Award under share-based payment arrangement.",
        "label": "Share Based Compensation Arrangements By Share Based Payment Award Award Type And Plan Name [Domain]",
        "terseLabel": "Equity Award [Domain]"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails",
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationTables"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average price at which option holders acquired shares when converting their stock options into shares.",
        "label": "Share-based Compensation Arrangements by Share-based Payment Award, Options, Exercises in Period, Weighted Average Exercise Price",
        "terseLabel": "Converted/Exercised (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average per share amount at which grantees can acquire shares of common stock by exercise of options.",
        "label": "Share-based Compensation Arrangements by Share-based Payment Award, Options, Grants in Period, Weighted Average Exercise Price",
        "terseLabel": "Granted (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareRepurchaseProgramAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by share repurchase program.",
        "label": "Share Repurchase Program [Axis]"
       }
      }
     },
     "localname": "ShareRepurchaseProgramAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareRepurchaseProgramDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Name of the share repurchase program.",
        "label": "Share Repurchase Program [Domain]",
        "terseLabel": "Share Repurchase Program [Domain]"
       }
      }
     },
     "localname": "ShareRepurchaseProgramDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1": {
     "auth_ref": [
      "r197",
      "r206"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Expected term of award under share-based payment arrangement, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Term",
        "terseLabel": "Expected life (in years)"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableIntrinsicValue1": {
     "auth_ref": [
      "r205"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of difference between fair value of the underlying shares reserved for issuance and exercise price of vested portions of options outstanding and currently exercisable.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Intrinsic Value",
        "terseLabel": "Exercisable, Aggregate Intrinsic Value"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableIntrinsicValue1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average grant-date fair value of non-vested options outstanding.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Nonvested, Weighted Average Grant Date Fair Value",
        "periodEndLabel": "Balance at end of period (in dollars per share)",
        "periodStartLabel": "Balance at beginning of period (in dollars per share)"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract]",
        "terseLabel": "Stock Options, Weighted Average Grant Date Fair Value Per Share"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1": {
     "auth_ref": [
      "r195"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Weighted average remaining contractual term for fully vested and expected to vest exercisable or convertible options, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. Includes, but is not limited to, unvested options for which requisite service period has not been rendered but that are expected to vest based on achievement of performance condition, if forfeitures are recognized when they occur.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Vested and Expected to Vest, Exercisable, Weighted Average Remaining Contractual Term",
        "terseLabel": "Weighted average remaining contractual term for vested stock options"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharesPaidForTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares used to settle grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Shares Paid for Tax Withholding for Share Based Compensation",
        "terseLabel": "Number of shares withheld to pay taxes on employees' equity awards (in shares)"
       }
      }
     },
     "localname": "SharesPaidForTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShortTermDebtTypeAxis": {
     "auth_ref": [
      "r30"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of short-term debt arrangement.",
        "label": "Short-term Debt, Type [Axis]"
       }
      }
     },
     "localname": "ShortTermDebtTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShortTermDebtTypeDomain": {
     "auth_ref": [
      "r28"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Type of short-term debt arrangement, such as notes, line of credit, commercial paper, asset-based financing, project financing, letter of credit financing.",
        "label": "Short Term Debt Type [Domain]",
        "terseLabel": "Short-term Debt, Type [Domain]"
       }
      }
     },
     "localname": "ShortTermDebtTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails",
      "http://www.topbuild.com/role/DisclosureLongTermDebtOtherDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShortTermLeaseCost": {
     "auth_ref": [
      "r254",
      "r263"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of short-term lease cost, excluding expense for lease with term of one month or less.",
        "label": "Short-term Lease, Cost",
        "terseLabel": "Short-term lease cost"
       }
      }
     },
     "localname": "ShortTermLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SignificantAccountingPoliciesTextBlock": {
     "auth_ref": [
      "r83"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The entire disclosure for all significant accounting policies of the reporting entity.",
        "label": "Significant Accounting Policies [Text Block]",
        "terseLabel": "Accounting Policies"
       }
      }
     },
     "localname": "SignificantAccountingPoliciesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_StatementBusinessSegmentsAxis": {
     "auth_ref": [
      "r0",
      "r106",
      "r131",
      "r141",
      "r142",
      "r143",
      "r294"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by business segments.",
        "label": "Segments [Axis]"
       }
      }
     },
     "localname": "StatementBusinessSegmentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureGoodwillAndOtherIntangiblesGoodwillDetails",
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionDisaggregationDetails",
      "http://www.topbuild.com/role/DisclosureSegmentInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementEquityComponentsAxis": {
     "auth_ref": [
      "r41",
      "r156"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by component of equity.",
        "label": "Equity Components [Axis]"
       }
      }
     },
     "localname": "StatementEquityComponentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementLineItems": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Statement [Line Items]",
        "terseLabel": "Statement"
       }
      }
     },
     "localname": "StatementLineItems",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails",
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfCashFlowsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS"
       }
      }
     },
     "localname": "StatementOfCashFlowsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfFinancialPositionAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "CONDENSED CONSOLIDATED BALANCE SHEETS"
       }
      }
     },
     "localname": "StatementOfFinancialPositionAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "CONDENSED CONSOLIDATED STATEMENTS OF CHANGES IN EQUITY"
       }
      }
     },
     "localname": "StatementOfStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementTable": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Schedule reflecting a Statement of Income, Statement of Cash Flows, Statement of Financial Position, Statement of Shareholders' Equity and Other Comprehensive Income, or other statement as needed.",
        "label": "Statement [Table]"
       }
      }
     },
     "localname": "StatementTable",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/DisclosureRevenueRecognitionOtherDetails",
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross": {
     "auth_ref": [
      "r156",
      "r161"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total number of shares issued during the period, including shares forfeited, as a result of Restricted Stock Awards.",
        "label": "Stock Issued During Period, Shares, Restricted Stock Award, Gross",
        "terseLabel": "Issuance of restricted share awards under long-term equity incentive plan (in shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesRestrictedStockAwardGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquityParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised": {
     "auth_ref": [
      "r15",
      "r16",
      "r156",
      "r161",
      "r186"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of share options (or share units) exercised during the current period.",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period",
        "negatedLabel": "Converted/Exercised (in shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareBasedCompensationActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardGross": {
     "auth_ref": [
      "r15",
      "r16",
      "r156",
      "r161"
     ],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Aggregate value of stock related to Restricted Stock Awards issued during the period.",
        "label": "Stock Issued During Period, Value, Restricted Stock Award, Gross",
        "terseLabel": "Issuance of restricted share awards under long-term equity incentive plan"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueRestrictedStockAwardGross",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockRepurchaseProgramAuthorizedAmount1": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of stock repurchase plan authorized.",
        "label": "Stock Repurchase Program, Authorized Amount",
        "terseLabel": "Share repurchase program, authorized amount"
       }
      }
     },
     "localname": "StockRepurchaseProgramAuthorizedAmount1",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquity": {
     "auth_ref": [
      "r16",
      "r20",
      "r21",
      "r117"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total of all stockholders' equity (deficit) items, net of receivables from officers, directors, owners, and affiliates of the entity which are attributable to the parent. The amount of the economic entity's stockholders' equity attributable to the parent excludes the amount of stockholders' equity which is allocable to that ownership interest in subsidiary equity which is not attributable to the parent (noncontrolling interest, minority interest). This excludes temporary equity and is sometimes called permanent equity.",
        "label": "Stockholders' Equity Attributable to Parent",
        "periodEndLabel": "Balance",
        "periodStartLabel": "Balance",
        "totalLabel": "Total equity"
       }
      }
     },
     "localname": "StockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Stockholders' Equity Attributable to Parent [Abstract]",
        "terseLabel": "Equity:"
       }
      }
     },
     "localname": "StockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubleaseIncome": {
     "auth_ref": [
      "r256",
      "r263"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of sublease income excluding finance and operating lease expense.",
        "label": "Sublease Income",
        "negatedLabel": "Sublease income"
       }
      }
     },
     "localname": "SubleaseIncome",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TreasuryStockAcquiredAverageCostPerShare": {
     "auth_ref": [
      "r162"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Total cost of shares repurchased divided by the total number of shares repurchased.",
        "label": "Treasury Stock Acquired, Average Cost Per Share",
        "terseLabel": "Average price per share (in dollars per share)"
       }
      }
     },
     "localname": "TreasuryStockAcquiredAverageCostPerShare",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_TreasuryStockMember": {
     "auth_ref": [
      "r40",
      "r162"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Shares of an entity that have been repurchased by the entity. This stock has no voting rights and receives no dividends. Note that treasury stock may be recorded at its total cost or separately as par (or stated) value and additional paid in capital. Classified within stockholders' equity if nonredeemable or redeemable solely at the option of the issuer. Classified within temporary equity if redemption is outside the control of the issuer.",
        "label": "Treasury Stock [Member]",
        "terseLabel": "Treasury Stock at Cost"
       }
      }
     },
     "localname": "TreasuryStockMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfChangesInEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_TreasuryStockShares": {
     "auth_ref": [
      "r40",
      "r162"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of common and preferred shares that were previously issued and that were repurchased by the issuing entity and held in treasury on the financial statement date. This stock has no voting rights and receives no dividends.",
        "label": "Treasury Stock, Shares",
        "terseLabel": "Treasury stock, shares at cost"
       }
      }
     },
     "localname": "TreasuryStockShares",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_TreasuryStockSharesAcquired": {
     "auth_ref": [
      "r16",
      "r156",
      "r161"
     ],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of shares that have been repurchased during the period and are being held in treasury.",
        "label": "Treasury Stock, Shares, Acquired",
        "terseLabel": "Number of shares repurchased (in shares)"
       }
      }
     },
     "localname": "TreasuryStockSharesAcquired",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_TreasuryStockValue": {
     "auth_ref": [
      "r40",
      "r162",
      "r163"
     ],
     "calculation": {
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The amount allocated to treasury stock. Treasury stock is common and preferred shares of an entity that were issued, repurchased by the entity, and are held in its treasury.",
        "label": "Treasury Stock, Value",
        "negatedLabel": "Treasury stock, 5,919,205 shares at June 30, 2020, and 5,394,761 shares at December 31, 2019, at cost"
       }
      }
     },
     "localname": "TreasuryStockValue",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/StatementCondensedConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TreasuryStockValueAcquiredCostMethod": {
     "auth_ref": [
      "r156",
      "r161",
      "r162"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Equity impact of the cost of common and preferred stock that were repurchased during the period. Recorded using the cost method.",
        "label": "Treasury Stock, Value, Acquired, Cost Method",
        "terseLabel": "Share repurchase cost"
       }
      }
     },
     "localname": "TreasuryStockValueAcquiredCostMethod",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureShareRepurchaseProgramDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TypeOfAdoptionMember": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Adoption and early adoption of sources of change to generally accepted accounting principles (GAAP) in the United States. The FASB released the FASB Accounting Standards Codification as the authoritative source of literature effective for interim and annual periods ending after September 15, 2009. As part of the Codification process, the FASB issues Accounting Standards Updates to amend the Codification but otherwise the Accounting Standards Updates are not authoritative in their own right. All previous accounting standards (such as FASB Statements of Financial Accounting Standards, FASB Interpretations, FASB Staff Positions, Emerging Issues Task Force Consensuses, other pronouncements of the FASB or other designated bodies, or other forms of GAAP are considered accounting pronouncements) were superseded upon the adoption of the Codification. For an interim period, references to the superseded standards are included to help users transition from the previous accounting hierarchy and will be removed from future versions of this taxonomy.",
        "label": "Type Of Adoption [Member]",
        "terseLabel": "Type of Adoption [Domain]"
       }
      }
     },
     "localname": "TypeOfAdoptionMember",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureAccountingPoliciesRecentlyAdoptedAccountingPronouncementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_VariableLeaseCost": {
     "auth_ref": [
      "r255",
      "r263"
     ],
     "crdr": "debit",
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Amount of variable lease cost, excluded from lease liability, recognized when obligation for payment is incurred for finance and operating leases.",
        "label": "Variable Lease, Cost",
        "terseLabel": "Variable lease cost"
       }
      }
     },
     "localname": "VariableLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLeasesComponentsOfLeaseExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_VariableRateAxis": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Information by type of variable rate.",
        "label": "Variable Rate [Axis]"
       }
      }
     },
     "localname": "VariableRateAxis",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_VariableRateDomain": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Interest rate that fluctuates over time as a result of an underlying benchmark interest rate or index.",
        "label": "Variable Rate [Domain]",
        "terseLabel": "Variable Rate [Domain]"
       }
      }
     },
     "localname": "VariableRateDomain",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureLongTermDebtKeyTermsOfCreditAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustmentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-US": {
       "role": {
        "label": "Incremental Weighted Average Shares Attributable to Dilutive Effect [Abstract]",
        "terseLabel": "Dilutive effect of common stock equivalents:"
       }
      }
     },
     "localname": "WeightedAverageNumberDilutedSharesOutstandingAdjustmentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding": {
     "auth_ref": [
      "r91",
      "r95"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "The average number of shares or units issued and outstanding that are used in calculating diluted EPS or earnings per unit (EPU), determined based on the timing of issuance of shares or units in the period.",
        "label": "Weighted Average Number of Shares Outstanding, Diluted",
        "terseLabel": "Diluted (in shares)",
        "totalLabel": "Weighted average number of common shares outstanding - diluted"
       }
      }
     },
     "localname": "WeightedAverageNumberOfDilutedSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_WeightedAverageNumberOfSharesOutstandingBasic": {
     "auth_ref": [
      "r90",
      "r95"
     ],
     "calculation": {
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding",
       "weight": 1.0
      }
     },
     "lang": {
      "en-US": {
       "role": {
        "documentation": "Number of [basic] shares or units, after adjustment for contingently issuable shares or units and other shares or units not deemed outstanding, determined by relating the portion of time within a reporting period that common shares or units have been outstanding to the total time in that period.",
        "label": "Weighted Average Number of Shares Outstanding, Basic",
        "terseLabel": "Basic (in shares)",
        "verboseLabel": "Weighted average number of common shares outstanding - basic"
       }
      }
     },
     "localname": "WeightedAverageNumberOfSharesOutstandingBasic",
     "nsuri": "http://fasb.org/us-gaap/2019-01-31",
     "presentation": [
      "http://www.topbuild.com/role/DisclosureIncomePerShareCalculationDetails",
      "http://www.topbuild.com/role/StatementCondensedConsolidatedStatementsOfOperations"
     ],
     "xbrltype": "sharesItemType"
    }
   },
   "unitCount": 6
  }
 },
 "std_ref": {
  "r0": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "205",
   "URI": "http://asc.fasb.org/extlink&oid=109222650&loc=d3e1361-107760"
  },
  "r1": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "205",
   "URI": "http://asc.fasb.org/topic&trid=2122149"
  },
  "r10": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(13))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r100": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "275",
   "URI": "http://asc.fasb.org/topic&trid=2134479"
  },
  "r101": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8721-108599"
  },
  "r102": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r103": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r104": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r105": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r106": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8736-108599"
  },
  "r107": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8813-108599"
  },
  "r108": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8906-108599"
  },
  "r109": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8933-108599"
  },
  "r11": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(14))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r110": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e8475-108599"
  },
  "r111": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "40",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e9031-108599"
  },
  "r112": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "42",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "http://asc.fasb.org/extlink&oid=115929826&loc=d3e9054-108599"
  },
  "r113": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "280",
   "URI": "http://asc.fasb.org/topic&trid=2134510"
  },
  "r114": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118952595&loc=d3e4428-111522"
  },
  "r115": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118952595&loc=d3e4531-111522"
  },
  "r116": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=118936363&loc=d3e5074-111524"
  },
  "r117": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 4.E)",
   "Topic": "310",
   "URI": "http://asc.fasb.org/extlink&oid=27010918&loc=d3e74512-122707"
  },
  "r118": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118950378&loc=SL82887624-210437"
  },
  "r119": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=118955202&loc=SL82895884-210446"
  },
  "r12": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(19))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r120": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "326",
   "URI": "http://asc.fasb.org/extlink&oid=119407570&loc=SL82919249-210447"
  },
  "r121": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "10",
   "Topic": "330",
   "URI": "http://asc.fasb.org/extlink&oid=68048583&loc=d3e3636-108311"
  },
  "r122": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "330",
   "URI": "http://asc.fasb.org/extlink&oid=116846819&loc=d3e3927-108312"
  },
  "r123": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "330",
   "URI": "http://asc.fasb.org/extlink&oid=116847112&loc=d3e4542-108314"
  },
  "r124": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=99380562&loc=d3e13770-109266"
  },
  "r125": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=99380562&loc=d3e13777-109266"
  },
  "r126": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=77989000&loc=SL49117168-202975"
  },
  "r127": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13816-109267"
  },
  "r128": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13816-109267"
  },
  "r129": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13816-109267"
  },
  "r13": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(20))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r130": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(h)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13816-109267"
  },
  "r131": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13816-109267"
  },
  "r132": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13854-109267"
  },
  "r133": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=108376223&loc=d3e13854-109267"
  },
  "r134": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=6388964&loc=d3e16212-109274"
  },
  "r135": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=6388964&loc=d3e16225-109274"
  },
  "r136": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "((a)(1),(b))",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r137": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)(1)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r138": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)(2)",
   "Topic": "350",
   "URI": "http://asc.fasb.org/extlink&oid=66006027&loc=d3e16323-109275"
  },
  "r139": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "350",
   "URI": "http://asc.fasb.org/topic&trid=2144416"
  },
  "r14": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(22))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r140": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229"
  },
  "r141": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "360",
   "URI": "http://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230"
  },
  "r142": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869"
  },
  "r143": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(d))",
   "Topic": "420",
   "URI": "http://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747"
  },
  "r144": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "440",
   "URI": "http://asc.fasb.org/topic&trid=2144648"
  },
  "r145": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14326-108349"
  },
  "r146": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "http://asc.fasb.org/extlink&oid=118942415&loc=d3e14615-108349"
  },
  "r147": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "450",
   "URI": "http://asc.fasb.org/topic&trid=2127136"
  },
  "r148": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=6802200&loc=d3e1835-112601"
  },
  "r149": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=6802200&loc=SL6230698-112601"
  },
  "r15": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(28))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r150": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(1)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=109500613&loc=SL6031897-161870"
  },
  "r151": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(3)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=109500613&loc=SL6031897-161870"
  },
  "r152": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=109500613&loc=SL6036836-161870"
  },
  "r153": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "40",
   "SubTopic": "50",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=117329964&loc=d3e12317-112629"
  },
  "r154": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "40",
   "SubTopic": "50",
   "Topic": "470",
   "URI": "http://asc.fasb.org/extlink&oid=117329964&loc=d3e12355-112629"
  },
  "r155": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "470",
   "URI": "http://asc.fasb.org/topic&trid=2208564"
  },
  "r156": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21463-112644"
  },
  "r157": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21475-112644"
  },
  "r158": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21506-112644"
  },
  "r159": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21521-112644"
  },
  "r16": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(29))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r160": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=109259400&loc=d3e21538-112644"
  },
  "r161": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.3-04)",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=27012166&loc=d3e187085-122770"
  },
  "r162": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=6405813&loc=d3e23239-112655"
  },
  "r163": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "505",
   "URI": "http://asc.fasb.org/extlink&oid=6405834&loc=d3e23315-112656"
  },
  "r164": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944033&loc=SL49130531-203044"
  },
  "r165": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944033&loc=SL49130532-203044"
  },
  "r166": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944033&loc=SL49130533-203044"
  },
  "r167": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130551-203045"
  },
  "r168": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130543-203045"
  },
  "r169": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130545-203045"
  },
  "r17": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r170": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118956577&loc=SL49130549-203045"
  },
  "r171": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944142&loc=SL49130690-203046-203046"
  },
  "r172": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "http://asc.fasb.org/extlink&oid=118944142&loc=SL49130690-203046-203046"
  },
  "r173": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "606",
   "URI": "http://asc.fasb.org/topic&trid=49130388"
  },
  "r174": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(ii)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118255775&loc=d3e1928-114920"
  },
  "r175": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(01)",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118255775&loc=d3e1928-114920"
  },
  "r176": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "715",
   "URI": "http://asc.fasb.org/extlink&oid=118257860&loc=d3e4179-114921"
  },
  "r177": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116855982&loc=d3e4534-113899"
  },
  "r178": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5047-113901"
  },
  "r179": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5047-113901"
  },
  "r18": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r180": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5047-113901"
  },
  "r181": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r182": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a),(g)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r183": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(i)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r184": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(i)-(ii)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r185": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iii)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r186": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r187": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(3)-(4)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r188": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r189": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(i)-(ii)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r19": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(3))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r190": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r191": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r192": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r193": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r194": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r195": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r196": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r197": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(i)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r198": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(ii)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r199": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(iii)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r2": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r20": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r200": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(iv)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r201": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r202": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(1)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r203": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(1)(i)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r204": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(i)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r205": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=116856206&loc=d3e5070-113901"
  },
  "r206": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 14.D.2)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=115993241&loc=d3e301413-122809"
  },
  "r207": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 14.F)",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=115993241&loc=d3e301413-122809"
  },
  "r208": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=118258462&loc=d3e11149-113907"
  },
  "r209": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "http://asc.fasb.org/extlink&oid=118258462&loc=d3e11178-113907"
  },
  "r21": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(31))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r210": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "718",
   "URI": "http://asc.fasb.org/topic&trid=2228938"
  },
  "r211": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=116821951&loc=d3e31931-109318"
  },
  "r212": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=84230637&loc=d3e32687-109319"
  },
  "r213": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=84230637&loc=d3e32698-109319"
  },
  "r214": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=84230637&loc=d3e32537-109319"
  },
  "r215": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "http://asc.fasb.org/extlink&oid=109238882&loc=d3e38679-109324"
  },
  "r216": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "740",
   "URI": "http://asc.fasb.org/topic&trid=2144680"
  },
  "r217": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "23",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "10",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=116868678&loc=d3e1043-128460"
  },
  "r218": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=79982066&loc=d3e1392-128463"
  },
  "r219": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=79982066&loc=d3e1486-128463"
  },
  "r22": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(32))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r220": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "30",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=116859721&loc=d3e6578-128477"
  },
  "r221": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "30",
   "SubTopic": "30",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=116859721&loc=d3e6613-128477"
  },
  "r222": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=35744584&loc=d3e6927-128479"
  },
  "r223": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(b)(1)",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=35744584&loc=d3e6927-128479"
  },
  "r224": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(c)(3)",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=35744584&loc=d3e6927-128479"
  },
  "r225": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "c",
   "Topic": "805",
   "URI": "http://asc.fasb.org/extlink&oid=35744584&loc=d3e6927-128479"
  },
  "r226": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "805",
   "URI": "http://asc.fasb.org/topic&trid=2303972"
  },
  "r227": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "810",
   "URI": "http://asc.fasb.org/extlink&oid=108774443&loc=SL4613673-111683"
  },
  "r228": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5618551-113959"
  },
  "r229": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "815",
   "URI": "http://asc.fasb.org/extlink&oid=109980867&loc=SL5624163-113959"
  },
  "r23": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(4)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r230": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r231": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r232": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bb)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r233": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bbb)(1)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r234": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bbb)(2)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r235": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r236": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r237": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r238": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r239": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19207-110258"
  },
  "r24": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(7))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r240": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=d3e19279-110258"
  },
  "r241": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "http://asc.fasb.org/extlink&oid=117815213&loc=SL6742756-110258"
  },
  "r242": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "http://asc.fasb.org/extlink&oid=118260190&loc=d3e13433-108611"
  },
  "r243": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Topic": "830",
   "URI": "http://asc.fasb.org/extlink&oid=98513438&loc=d3e33268-110906"
  },
  "r244": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=6450988&loc=d3e26243-108391"
  },
  "r245": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775744&loc=d3e28541-108399"
  },
  "r246": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775744&loc=d3e28551-108399"
  },
  "r247": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775744&loc=d3e28555-108399"
  },
  "r248": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "30",
   "Topic": "835",
   "URI": "http://asc.fasb.org/extlink&oid=114775985&loc=d3e28878-108400"
  },
  "r249": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918627-209977"
  },
  "r25": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(8))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r250": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918627-209977"
  },
  "r251": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888419&loc=SL77918643-209977"
  },
  "r252": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)(3)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918673-209980"
  },
  "r253": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r254": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r255": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r256": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r257": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(1)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r258": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(2)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r259": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(3)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r26": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.1)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r260": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(4)",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r261": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918686-209980"
  },
  "r262": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888426&loc=SL77918701-209980"
  },
  "r263": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "53",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/extlink&oid=77888399&loc=SL77918982-209971"
  },
  "r264": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "http://asc.fasb.org/subtopic&trid=77888251"
  },
  "r265": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "855",
   "URI": "http://asc.fasb.org/extlink&oid=6842918&loc=SL6314020-165662"
  },
  "r266": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r267": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(1)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r268": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(3)",
   "Topic": "860",
   "URI": "http://asc.fasb.org/extlink&oid=118948506&loc=d3e107207-111719"
  },
  "r269": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "340",
   "Topic": "928",
   "URI": "http://asc.fasb.org/extlink&oid=6473545&loc=d3e61844-108004"
  },
  "r27": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.17)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r270": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "940",
   "URI": "http://asc.fasb.org/extlink&oid=68072869&loc=d3e41242-110953"
  },
  "r271": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(11))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r272": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(13))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r273": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(15)(1))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r274": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(16))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r275": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(23))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r276": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.17)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=6876686&loc=d3e534808-122878"
  },
  "r277": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(15))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r278": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(22))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r279": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(23))",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r28": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r280": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04.9)",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=116637391&loc=SL114874048-224260"
  },
  "r281": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "470",
   "Subparagraph": "e",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=75038535&loc=d3e64711-112823"
  },
  "r282": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "470",
   "Topic": "942",
   "URI": "http://asc.fasb.org/extlink&oid=75038535&loc=d3e64711-112823"
  },
  "r283": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(16))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r284": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(12))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r285": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(15)(b)(1))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r286": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(16))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r287": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(23)(a)(4))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r288": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(25))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r289": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(8))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r29": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(b),22(b))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r290": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.(a),19)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=119400593&loc=d3e572229-122910"
  },
  "r291": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(18))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116637232&loc=SL114874131-224263"
  },
  "r292": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(19))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116637232&loc=SL114874131-224263"
  },
  "r293": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(8))",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116637232&loc=SL114874131-224263"
  },
  "r294": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=116884468&loc=SL65671331-158438"
  },
  "r295": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(a)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=117419784&loc=SL117783719-158441"
  },
  "r296": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(c)",
   "Topic": "944",
   "URI": "http://asc.fasb.org/extlink&oid=117419784&loc=SL117783719-158441"
  },
  "r297": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b"
  },
  "r298": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "d1-1"
  },
  "r299": {
   "Name": "Form 10-Q",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-13"
  },
  "r3": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r30": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r300": {
   "Name": "Forms 10-K, 10-Q, 20-F",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-1-"
  },
  "r301": {
   "Name": "Regulation 12B",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b-2"
  },
  "r302": {
   "Name": "Regulation S-T",
   "Number": "232",
   "Publisher": "SEC",
   "Section": "405"
  },
  "r31": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19,20)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r32": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19-26)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r33": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.20)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r34": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.21)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r35": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22(a)(1))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r36": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22(a)(2))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r37": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r38": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.24)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r39": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.25)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r4": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r40": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29,30)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r41": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29-31)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r42": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.6(a))",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r43": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.9)",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=6877327&loc=d3e13212-122682"
  },
  "r44": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669619-108580"
  },
  "r45": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=118930883&loc=SL7669625-108580"
  },
  "r46": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(210.5-03(11))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r47": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(10))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r48": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(20))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r49": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(21))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r5": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6676-107765"
  },
  "r50": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(5))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r51": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(8))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r52": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.1,2)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r53": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.13)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r54": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.2(a),(d))",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r55": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.4)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r56": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.7)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r57": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.9)",
   "Topic": "220",
   "URI": "http://asc.fasb.org/extlink&oid=116634182&loc=SL114868664-224227"
  },
  "r58": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3179-108585"
  },
  "r59": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3179-108585"
  },
  "r6": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6801-107765"
  },
  "r60": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r61": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r62": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3213-108585"
  },
  "r63": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3255-108585"
  },
  "r64": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r65": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r66": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r67": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3291-108585"
  },
  "r68": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(ee)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3367-108585"
  },
  "r69": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3521-108585"
  },
  "r7": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6911-107765"
  },
  "r70": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3536-108585"
  },
  "r71": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r72": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r73": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3602-108585"
  },
  "r74": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=118932676&loc=d3e3044-108585"
  },
  "r75": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4304-108586"
  },
  "r76": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4313-108586"
  },
  "r77": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "http://asc.fasb.org/extlink&oid=98513485&loc=d3e4332-108586"
  },
  "r78": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r79": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(e),(f))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r8": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e6935-107765"
  },
  "r80": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08.(h)(2))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e23780-122690"
  },
  "r81": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.12-04(a))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e24072-122690"
  },
  "r82": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.12-04.(a))",
   "Topic": "235",
   "URI": "http://asc.fasb.org/extlink&oid=26873400&loc=d3e24072-122690"
  },
  "r83": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "235",
   "URI": "http://asc.fasb.org/topic&trid=2122369"
  },
  "r84": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22499-107794"
  },
  "r85": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22694-107794"
  },
  "r86": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22583-107794"
  },
  "r87": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22644-107794"
  },
  "r88": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22658-107794"
  },
  "r89": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "http://asc.fasb.org/extlink&oid=109234566&loc=d3e22663-107794"
  },
  "r9": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "http://asc.fasb.org/extlink&oid=118951113&loc=d3e7018-107765"
  },
  "r90": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1448-109256"
  },
  "r91": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1505-109256"
  },
  "r92": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1252-109256"
  },
  "r93": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "60B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=SL5780133-109256"
  },
  "r94": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117326831&loc=d3e1337-109256"
  },
  "r95": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=6371337&loc=d3e3550-109257"
  },
  "r96": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=6371337&loc=d3e3550-109257"
  },
  "r97": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=6371337&loc=d3e3550-109257"
  },
  "r98": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "52",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "http://asc.fasb.org/extlink&oid=117327953&loc=d3e4984-109258"
  },
  "r99": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "260",
   "URI": "http://asc.fasb.org/topic&trid=2144383"
  }
 },
 "version": "2.1"
}
