<?xml version="1.0" encoding="US-ASCII"?>
<!-- DFS Xcelerate Taxonomy Calculation Linkbase - http://www.dfsco.com/financial-services/ -->
<!-- Version: 6.23.6 -->
<!-- Round: 5912551e-4d31-456b-8ed1-fe30b1f3876d -->
<!-- Creation date: 2019-02-09T01:27:09Z -->
<!-- Copyright (c) 2017 Donnelley Financial, LLC. All Rights Reserved. -->
<linkbase xmlns="http://www.xbrl.org/2003/linkbase"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DocumentandEntityInformation" roleURI="http://www.trex.com/taxonomy/role/DocumentandEntityInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#StatementOfIncome" roleURI="http://www.trex.com/taxonomy/role/StatementOfIncome"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#StatementOfFinancialPositionClassified" roleURI="http://www.trex.com/taxonomy/role/StatementOfFinancialPositionClassified"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#StatementOfFinancialPositionClassifiedParen" roleURI="http://www.trex.com/taxonomy/role/StatementOfFinancialPositionClassifiedParenthetical"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#StatementOfShareholdersEquityAndOtherComprehensiveIncome" roleURI="http://www.trex.com/taxonomy/role/StatementOfShareholdersEquityAndOtherComprehensiveIncome"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#StatementOfCashFlowsIndirect" roleURI="http://www.trex.com/taxonomy/role/StatementOfCashFlowsIndirect"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureBusinessAndOrganizationAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureBusinessAndOrganizationAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureSummaryOfSignificantAccountingPoliciesEstimatedUsefulLivesOfPropertyPlantAndEquipment" roleURI="http://www.trex.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesEstimatedUsefulLivesOfPropertyPlantAndEquipment"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureAcquisitionAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureAcquisitionAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureAcquisitionSummaryOfConsiderationAllocatedToAssetsAcquiredAndLiabilitiesAssumed" roleURI="http://www.trex.com/taxonomy/role/DisclosureAcquisitionSummaryOfConsiderationAllocatedToAssetsAcquiredAndLiabilitiesAssumed"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureInventoriesSummaryOfInventories" roleURI="http://www.trex.com/taxonomy/role/DisclosureInventoriesSummaryOfInventories"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureInventoriesAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureInventoriesAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosurePrepaidExpensesAndOtherAssetsSummaryOfPrepaidExpensesAndOtherAssets" roleURI="http://www.trex.com/taxonomy/role/DisclosurePrepaidExpensesAndOtherAssetsSummaryOfPrepaidExpensesAndOtherAssets"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureGoodwillAndOtherIntangibleAssetsAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureGoodwillAndOtherIntangibleAssetsDetailsOfIntangibleAssets" roleURI="http://www.trex.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsDetailsOfIntangibleAssets"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosurePropertyPlantAndEquipmentSummaryOfPropertyPlantAndEquipment" roleURI="http://www.trex.com/taxonomy/role/DisclosurePropertyPlantAndEquipmentSummaryOfPropertyPlantAndEquipment"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosurePropertyPlantAndEquipmentAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosurePropertyPlantAndEquipmentAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureAccruedExpensesAndOtherLiabilitiesSummaryOfAccruedExpensesAndOtherLiabilities" roleURI="http://www.trex.com/taxonomy/role/DisclosureAccruedExpensesAndOtherLiabilitiesSummaryOfAccruedExpensesAndOtherLiabilities"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureDebtAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureDebtAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockholdersEquityAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockholdersEquityComputationOfBasicAndDilutedEarningsPerShare" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityComputationOfBasicAndDilutedEarningsPerShare"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockholdersEquityAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShare" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShare"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureRevenueFromContractsWithCustomersAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureRevenueFromContractsWithCustomersAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureRevenueFromContractsWithCustomersSummaryOfDisaggregatedNetSales" roleURI="http://www.trex.com/taxonomy/role/DisclosureRevenueFromContractsWithCustomersSummaryOfDisaggregatedNetSales"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockBasedCompensationAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockBasedCompensationSummaryOfStockBasedCompensationExpenses" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSummaryOfStockBasedCompensationExpenses"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockBasedCompensationTimeBasedRestrictedStockAndRestrictedStockUnitActivity" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationTimeBasedRestrictedStockAndRestrictedStockUnitActivity"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockBasedCompensationPerformanceBasedRestrictedStockActivity" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationPerformanceBasedRestrictedStockActivity"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockBasedCompensationSummaryOfAssumptionsUsedToEstimateFairValueOfEachSAR" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSummaryOfAssumptionsUsedToEstimateFairValueOfEachSAR"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureStockBasedCompensationSARActivity" roleURI="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSARActivity"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureLeasesMinimumAnnualPaymentsUnderNonCancelableLeases" roleURI="http://www.trex.com/taxonomy/role/DisclosureLeasesMinimumAnnualPaymentsUnderNonCancelableLeases"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureLeasesAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureLeasesAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureEmployeeBenefitPlansAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureEmployeeBenefitPlansAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureIncomeTaxesIncomeTaxProvisionBenefit" roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesIncomeTaxProvisionBenefit"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureIncomeTaxesReconciliationOfDifferencesBetweenIncomeTaxProvisionAndIncomeTaxDeterminedByApplyingUSFederalStatutoryRate" roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesReconciliationOfDifferencesBetweenIncomeTaxProvisionAndIncomeTaxDeterminedByApplyingUSFederalStatutoryRate"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureIncomeTaxesScheduleOfDeferredTaxAssetsAndLiabilities" roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesScheduleOfDeferredTaxAssetsAndLiabilities"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureIncomeTaxesAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureSegmentInformationAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureSegmentInformationDetailsOfSegmentInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationDetailsOfSegmentInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureSegmentInformationScheduleOfReconciliationOfNetIncomeToEBITDA" roleURI="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationScheduleOfReconciliationOfNetIncomeToEBITDA"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureCommitmentsAndContingenciesAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureCommitmentsAndContingenciesAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureCommitmentsAndContingenciesSummaryOfReconciliationOfCompanysResidentialProductWarrantyReserve" roleURI="http://www.trex.com/taxonomy/role/DisclosureCommitmentsAndContingenciesSummaryOfReconciliationOfCompanysResidentialProductWarrantyReserve"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureInterimFinancialDataUnauditedSummaryOfInterimFinancialData" roleURI="http://www.trex.com/taxonomy/role/DisclosureInterimFinancialDataUnauditedSummaryOfInterimFinancialData"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureInterimFinancialDataUnauditedAdditionalInformation" roleURI="http://www.trex.com/taxonomy/role/DisclosureInterimFinancialDataUnauditedAdditionalInformation"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#DisclosureScheduleIIValuationAndQualifyingAccountsAndReserves" roleURI="http://www.trex.com/taxonomy/role/DisclosureScheduleIIValuationAndQualifyingAccountsAndReserves"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsNatureOfOperations" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsNatureOfOperations"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockPolicies" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockPolicies"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsBusinessCombinationDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBusinessCombinationDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsBusinessCombinationDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBusinessCombinationDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsInventoryDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsInventoryDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsInventoryDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsInventoryDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsDebtDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsFinancialInstrumentsDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsFinancialInstrumentsDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsCompensationAndEmployeeBenefitPlansOtherThanShareBasedCompensationTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCompensationAndEmployeeBenefitPlansOtherThanShareBasedCompensationTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsIncomeTaxDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsIncomeTaxDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsIncomeTaxDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsIncomeTaxDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsSegmentReportingDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsSegmentReportingDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsSeasonalityDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSeasonalityDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsQuarterlyFinancialInformationTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsQuarterlyFinancialInformationTextBlock"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsQuarterlyFinancialInformationTextBlockTables" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsQuarterlyFinancialInformationTextBlockTables"/>
  <roleRef xlink:type="simple" xlink:href="trex-20181231.xsd#Role_NotesToFinancialStatementsScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock" roleURI="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock"/>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DocumentandEntityInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/StatementOfIncome">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold" xlink:label="us-gaap_CostOfGoodsAndServicesSold"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GrossProfit" xlink:label="us-gaap_GrossProfit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="us-gaap_IncomeTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InterestIncomeExpenseNet" xlink:label="us-gaap_InterestIncomeExpenseNet"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="us-gaap_NetIncomeLoss"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="us-gaap_OperatingIncomeLoss"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" xlink:label="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense" xlink:label="us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_GrossProfit" xlink:to="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_GrossProfit" xlink:to="us-gaap_CostOfGoodsAndServicesSold" order="1.0200" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:to="us-gaap_OperatingIncomeLoss" order="1.0500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:to="us-gaap_InterestIncomeExpenseNet" order="1.0600" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetIncomeLoss" xlink:to="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" order="1.0700" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetIncomeLoss" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="1.0800" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingIncomeLoss" xlink:to="us-gaap_GrossProfit" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingIncomeLoss" xlink:to="us-gaap_SellingGeneralAndAdministrativeExpense" order="1.0400" weight="-1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/StatementOfFinancialPositionClassified">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsPayableCurrent" xlink:label="us-gaap_AccountsPayableCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccountsReceivableNetCurrent" xlink:label="us-gaap_AccountsReceivableNetCurrent"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:label="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AdditionalPaidInCapitalCommonStock" xlink:label="us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Assets" xlink:label="us-gaap_Assets"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AssetsCurrent" xlink:label="us-gaap_AssetsCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="us-gaap_CommitmentsAndContingencies"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CommonStockValue" xlink:label="us-gaap_CommonStockValue"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxLiabilitiesNoncurrent" xlink:label="us-gaap_DeferredTaxLiabilitiesNoncurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="us-gaap_IntangibleAssetsNetIncludingGoodwill"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryNet" xlink:label="us-gaap_InventoryNet"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Liabilities" xlink:label="us-gaap_Liabilities"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="us-gaap_LiabilitiesAndStockholdersEquity"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LiabilitiesCurrent" xlink:label="us-gaap_LiabilitiesCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsNoncurrent" xlink:label="us-gaap_OtherAssetsNoncurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherLiabilitiesNoncurrent" xlink:label="us-gaap_OtherLiabilitiesNoncurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PreferredStockValue" xlink:label="us-gaap_PreferredStockValue"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:label="us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="us-gaap_PropertyPlantAndEquipmentNet"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StandardProductWarrantyAccrualCurrent" xlink:label="us-gaap_StandardProductWarrantyAccrualCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StandardProductWarrantyAccrualNoncurrent" xlink:label="us-gaap_StandardProductWarrantyAccrualNoncurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="us-gaap_StockholdersEquity"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_TreasuryStockValue" xlink:label="us-gaap_TreasuryStockValue"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_AssetsCurrent" order="1.0500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="1.0600" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_IntangibleAssetsNetIncludingGoodwill" order="1.0700" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Assets" xlink:to="us-gaap_OtherAssetsNoncurrent" order="1.0800" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AssetsCurrent" xlink:to="us-gaap_CashAndCashEquivalentsAtCarryingValue" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AssetsCurrent" xlink:to="us-gaap_AccountsReceivableNetCurrent" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AssetsCurrent" xlink:to="us-gaap_InventoryNet" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_AssetsCurrent" xlink:to="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_LiabilitiesCurrent" order="1.1200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_DeferredTaxLiabilitiesNoncurrent" order="1.1300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_StandardProductWarrantyAccrualNoncurrent" order="1.1400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_Liabilities" xlink:to="us-gaap_OtherLiabilitiesNoncurrent" order="1.1500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesAndStockholdersEquity" xlink:to="us-gaap_Liabilities" order="1.1600" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesAndStockholdersEquity" xlink:to="us-gaap_CommitmentsAndContingencies" order="1.1700" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesAndStockholdersEquity" xlink:to="us-gaap_StockholdersEquity" order="1.2300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesCurrent" xlink:to="us-gaap_AccountsPayableCurrent" order="1.0900" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesCurrent" xlink:to="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" order="1.1000" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LiabilitiesCurrent" xlink:to="us-gaap_StandardProductWarrantyAccrualCurrent" order="1.1100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_PreferredStockValue" order="1.1800" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_CommonStockValue" order="1.1900" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_AdditionalPaidInCapitalCommonStock" order="1.2000" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_RetainedEarningsAccumulatedDeficit" order="1.2100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_StockholdersEquity" xlink:to="us-gaap_TreasuryStockValue" order="1.2200" weight="-1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/StatementOfFinancialPositionClassifiedParenthetical">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/StatementOfShareholdersEquityAndOtherComprehensiveIncome">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/StatementOfCashFlowsIndirect">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect" xlink:label="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:label="us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization" xlink:label="us-gaap_DepreciationDepletionAndAmortization"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment" xlink:label="us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayable" xlink:label="us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable" xlink:label="us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities" xlink:label="us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable" xlink:label="us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInInventories" xlink:label="us-gaap_IncreaseDecreaseInInventories"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:label="us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherNoncashIncomeExpense" xlink:label="us-gaap_OtherNoncashIncomeExpense"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock" xlink:label="us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsOfFinancingCosts" xlink:label="us-gaap_PaymentsOfFinancingCosts"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired" xlink:label="us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions" xlink:label="us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromLinesOfCredit" xlink:label="us-gaap_ProceedsFromLinesOfCredit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" xlink:label="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ProfitLoss" xlink:label="us-gaap_ProfitLoss"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_RepaymentsOfLinesOfCredit" xlink:label="us-gaap_RepaymentsOfLinesOfCredit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="us-gaap_ShareBasedCompensation"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect" xlink:to="us-gaap_NetCashProvidedByUsedInOperatingActivities" order="1.1300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect" xlink:to="us-gaap_NetCashProvidedByUsedInInvestingActivities" order="1.1700" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect" xlink:to="us-gaap_NetCashProvidedByUsedInFinancingActivities" order="1.2300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_PaymentsOfFinancingCosts" order="1.1800" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_ProceedsFromLinesOfCredit" order="1.1900" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_RepaymentsOfLinesOfCredit" order="1.2000" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_PaymentsForRepurchaseOfCommonStock" order="1.2100" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:to="us-gaap_ProceedsFromIssuanceOfSharesUnderIncentiveAndShareBasedCompensationPlansIncludingStockOptions" order="1.2200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" order="1.1400" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" order="1.1500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:to="us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired" order="1.1600" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_ProfitLoss" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_DepreciationDepletionAndAmortization" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_DeferredIncomeTaxExpenseBenefit" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_ShareBasedCompensation" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" order="1.0500" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_OtherNoncashIncomeExpense" order="1.0600" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInAccountsReceivable" order="1.0700" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInInventories" order="1.0800" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" order="1.0900" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInAccountsPayable" order="1.1000" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInAccruedLiabilitiesAndOtherOperatingLiabilities" order="1.1100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:to="us-gaap_IncreaseDecreaseInIncomeTaxesPayableNetOfIncomeTaxesReceivable" order="1.1200" weight="1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureBusinessAndOrganizationAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesEstimatedUsefulLivesOfPropertyPlantAndEquipment">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureAcquisitionAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureAcquisitionSummaryOfConsiderationAllocatedToAssetsAcquiredAndLiabilitiesAssumed">
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAccruedLiabilitiesAndOtherExpenses" xlink:label="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAccruedLiabilitiesAndOtherExpenses"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedBillingsInExcessOfCost" xlink:label="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedBillingsInExcessOfCost"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedContractsRetainage" xlink:label="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedContractsRetainage"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCostsAndEstimatedEarningsInExcessOfBillingsOnUncompletedContracts" xlink:label="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCostsAndEstimatedEarningsInExcessOfBillingsOnUncompletedContracts"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsPrepaidExpenseAndOtherAssets" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsPrepaidExpenseAndOtherAssets"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCustomerDeposits" xlink:label="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCustomerDeposits"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInventory" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInventory"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:label="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_Goodwill" xlink:label="us-gaap_Goodwill"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsReceivables" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedContractsRetainage" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedInventory" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssetsPrepaidExpenseAndOtherAssets" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCostsAndEstimatedEarningsInExcessOfBillingsOnUncompletedContracts" order="1.0500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment" order="1.0600" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill" order="1.0700" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="us-gaap_Goodwill" order="1.0800" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilitiesAccountsPayable" order="1.0900" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedAccruedLiabilitiesAndOtherExpenses" order="1.1000" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedBillingsInExcessOfCost" order="1.1100" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet" xlink:to="trex_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCustomerDeposits" order="1.1200" weight="-1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureInventoriesSummaryOfInventories">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryFinishedGoods" xlink:label="us-gaap_InventoryFinishedGoods"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryGross" xlink:label="us-gaap_InventoryGross"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryLIFOReserve" xlink:label="us-gaap_InventoryLIFOReserve"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_InventoryRawMaterials" xlink:label="us-gaap_InventoryRawMaterials"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_LIFOInventoryAmount" xlink:label="us-gaap_LIFOInventoryAmount"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InventoryGross" xlink:to="us-gaap_InventoryFinishedGoods" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_InventoryGross" xlink:to="us-gaap_InventoryRawMaterials" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LIFOInventoryAmount" xlink:to="us-gaap_InventoryGross" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_LIFOInventoryAmount" xlink:to="us-gaap_InventoryLIFOReserve" order="1.0400" weight="-1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureInventoriesAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosurePrepaidExpensesAndOtherAssetsSummaryOfPrepaidExpensesAndOtherAssets">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractReceivableRetainageDueOneYearOrLess" xlink:label="us-gaap_ContractReceivableRetainageDueOneYearOrLess"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerAssetNetCurrent" xlink:label="us-gaap_ContractWithCustomerAssetNetCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxesReceivable" xlink:label="us-gaap_IncomeTaxesReceivable"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAssetsCurrent" xlink:label="us-gaap_OtherAssetsCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:label="us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PrepaidExpenseCurrent" xlink:label="us-gaap_PrepaidExpenseCurrent"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:to="us-gaap_ContractWithCustomerAssetNetCurrent" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:to="us-gaap_PrepaidExpenseCurrent" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:to="us-gaap_ContractReceivableRetainageDueOneYearOrLess" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:to="us-gaap_IncomeTaxesReceivable" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:to="us-gaap_OtherAssetsCurrent" order="1.0500" weight="1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureGoodwillAndOtherIntangibleAssetsDetailsOfIntangibleAssets">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" xlink:label="us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsGrossExcludingGoodwill" xlink:label="us-gaap_IntangibleAssetsGrossExcludingGoodwill"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:label="us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:to="us-gaap_IntangibleAssetsGrossExcludingGoodwill" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:to="us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" order="1.0400" weight="-1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosurePropertyPlantAndEquipmentSummaryOfPropertyPlantAndEquipment">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="us-gaap_PropertyPlantAndEquipmentGross"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="us-gaap_PropertyPlantAndEquipmentNet"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_PropertyPlantAndEquipmentNet" xlink:to="us-gaap_PropertyPlantAndEquipmentGross" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_PropertyPlantAndEquipmentNet" xlink:to="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" order="1.0300" weight="-1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosurePropertyPlantAndEquipmentAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureAccruedExpensesAndOtherLiabilitiesSummaryOfAccruedExpensesAndOtherLiabilities">
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:label="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_AccruedManufacturingExpensesCurrent" xlink:label="trex_AccruedManufacturingExpensesCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_AccruedMarketingCostsCurrent" xlink:label="us-gaap_AccruedMarketingCostsCurrent"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_BillingsInExcessOfRevenuesCurrent" xlink:label="trex_BillingsInExcessOfRevenuesCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_ContractWithCustomerLiabilityCurrent" xlink:label="us-gaap_ContractWithCustomerLiabilityCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredRentCreditCurrent" xlink:label="us-gaap_DeferredRentCreditCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent" xlink:label="us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OtherAccruedLiabilitiesCurrent" xlink:label="us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:to="us-gaap_AccruedMarketingCostsCurrent" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:to="us-gaap_EmployeeRelatedLiabilitiesCurrent" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:to="trex_AccruedManufacturingExpensesCurrent" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:to="us-gaap_ContractWithCustomerLiabilityCurrent" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:to="us-gaap_DeferredRentCreditCurrent" order="1.0500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:to="trex_BillingsInExcessOfRevenuesCurrent" order="1.0600" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="trex_AccruedLiabilitiesAndOtherLiabilitiesCurrentExcludingWarranty" xlink:to="us-gaap_OtherAccruedLiabilitiesCurrent" order="1.0700" weight="1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureDebtAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityComputationOfBasicAndDilutedEarningsPerShare">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements" xlink:label="us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:label="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:label="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:to="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:to="us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements" order="1.0200" weight="1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockholdersEquityAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShare">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureRevenueFromContractsWithCustomersAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureRevenueFromContractsWithCustomersSummaryOfDisaggregatedNetSales">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSummaryOfStockBasedCompensationExpenses">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationTimeBasedRestrictedStockAndRestrictedStockUnitActivity">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationPerformanceBasedRestrictedStockActivity">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSummaryOfAssumptionsUsedToEstimateFairValueOfEachSAR">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureStockBasedCompensationSARActivity">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureLeasesMinimumAnnualPaymentsUnderNonCancelableLeases">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDue"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_OperatingLeasesFutureMinimumPaymentsDueThereafter" xlink:label="us-gaap_OperatingLeasesFutureMinimumPaymentsDueThereafter"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueCurrent" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInTwoYears" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInThreeYears" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFourYears" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueInFiveYears" order="1.0500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_OperatingLeasesFutureMinimumPaymentsDue" xlink:to="us-gaap_OperatingLeasesFutureMinimumPaymentsDueThereafter" order="1.0600" weight="1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureLeasesAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureEmployeeBenefitPlansAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesIncomeTaxProvisionBenefit">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CurrentFederalTaxExpenseBenefit" xlink:label="us-gaap_CurrentFederalTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit" xlink:label="us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_CurrentStateAndLocalTaxExpenseBenefit" xlink:label="us-gaap_CurrentStateAndLocalTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredFederalIncomeTaxExpenseBenefit" xlink:label="us-gaap_DeferredFederalIncomeTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:label="us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit" xlink:label="us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="us-gaap_IncomeTaxExpenseBenefit"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CurrentIncomeTaxExpenseBenefit" xlink:to="us-gaap_CurrentFederalTaxExpenseBenefit" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_CurrentIncomeTaxExpenseBenefit" xlink:to="us-gaap_CurrentStateAndLocalTaxExpenseBenefit" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:to="us-gaap_DeferredFederalIncomeTaxExpenseBenefit" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:to="us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit" order="1.0500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_CurrentIncomeTaxExpenseBenefit" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_DeferredIncomeTaxExpenseBenefit" order="1.0600" weight="1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesReconciliationOfDifferencesBetweenIncomeTaxProvisionAndIncomeTaxDeterminedByApplyingUSFederalStatutoryRate">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="us-gaap_IncomeTaxExpenseBenefit"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxReconciliationDeductionsQualifiedProductionActivities" xlink:label="us-gaap_IncomeTaxReconciliationDeductionsQualifiedProductionActivities"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate" xlink:label="us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxReconciliationNondeductibleExpense" xlink:label="us-gaap_IncomeTaxReconciliationNondeductibleExpense"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxReconciliationOtherAdjustments" xlink:label="us-gaap_IncomeTaxReconciliationOtherAdjustments"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes" xlink:label="us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxReconciliationTaxCredits" xlink:label="us-gaap_IncomeTaxReconciliationTaxCredits"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_IncomeTaxReconciliationTaxSettlements" xlink:label="us-gaap_IncomeTaxReconciliationTaxSettlements"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_IncomeTaxReconciliationNondeductibleExpense" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_IncomeTaxReconciliationTaxSettlements" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_IncomeTaxReconciliationDeductionsQualifiedProductionActivities" order="1.0500" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_IncomeTaxReconciliationTaxCredits" order="1.0600" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_IncomeTaxExpenseBenefit" xlink:to="us-gaap_IncomeTaxReconciliationOtherAdjustments" order="1.0700" weight="1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesScheduleOfDeferredTaxAssetsAndLiabilities">
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilities" xlink:label="us-gaap_DeferredIncomeTaxLiabilities"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet" xlink:label="us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsGross" xlink:label="us-gaap_DeferredTaxAssetsGross"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsInventory" xlink:label="us-gaap_DeferredTaxAssetsInventory"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsNet" xlink:label="us-gaap_DeferredTaxAssetsNet"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards" xlink:label="us-gaap_DeferredTaxAssetsOperatingLossCarryforwards"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsOther" xlink:label="us-gaap_DeferredTaxAssetsOther"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" xlink:label="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost" xlink:label="us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves" xlink:label="us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves"/>
    <loc xlink:type="locator" xlink:href="http://xbrl.fasb.org/us-gaap/2018/elts/us-gaap-2018-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance" xlink:label="us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_DeferredTaxLiabilitiesDepreciation" xlink:label="trex_DeferredTaxLiabilitiesDepreciation"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_DeferredTaxLiabilitiesGoodwillAmortization" xlink:label="trex_DeferredTaxLiabilitiesGoodwillAmortization"/>
    <loc xlink:type="locator" xlink:href="trex-20181231.xsd#trex_DeferredTaxLiabilitiesInventoriesAndOther" xlink:label="trex_DeferredTaxLiabilitiesInventoriesAndOther"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredIncomeTaxLiabilities" xlink:to="trex_DeferredTaxLiabilitiesDepreciation" order="1.1000" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredIncomeTaxLiabilities" xlink:to="trex_DeferredTaxLiabilitiesGoodwillAmortization" order="1.1100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredIncomeTaxLiabilities" xlink:to="trex_DeferredTaxLiabilitiesInventoriesAndOther" order="1.1200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredIncomeTaxLiabilitiesNet" xlink:to="us-gaap_DeferredTaxAssetsNet" order="1.0900" weight="-1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredIncomeTaxLiabilitiesNet" xlink:to="us-gaap_DeferredIncomeTaxLiabilities" order="1.1300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsGross" xlink:to="us-gaap_DeferredTaxAssetsOperatingLossCarryforwards" order="1.0100" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsGross" xlink:to="us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsWarrantyReserves" order="1.0200" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsGross" xlink:to="us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost" order="1.0300" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsGross" xlink:to="us-gaap_DeferredTaxAssetsOther" order="1.0400" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsGross" xlink:to="us-gaap_DeferredTaxAssetsInventory" order="1.0500" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsGross" xlink:to="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" order="1.0600" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsNet" xlink:to="us-gaap_DeferredTaxAssetsGross" order="1.0700" weight="1.00" priority="2" use="optional"/>
    <calculationArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="us-gaap_DeferredTaxAssetsNet" xlink:to="us-gaap_DeferredTaxAssetsValuationAllowance" order="1.0800" weight="-1.00" priority="2" use="optional"/>
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureIncomeTaxesAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationDetailsOfSegmentInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureSegmentInformationScheduleOfReconciliationOfNetIncomeToEBITDA">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureCommitmentsAndContingenciesAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureCommitmentsAndContingenciesSummaryOfReconciliationOfCompanysResidentialProductWarrantyReserve">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureInterimFinancialDataUnauditedSummaryOfInterimFinancialData">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureInterimFinancialDataUnauditedAdditionalInformation">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/DisclosureScheduleIIValuationAndQualifyingAccountsAndReserves">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsNatureOfOperations">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockPolicies">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBasisOfPresentationAndSignificantAccountingPoliciesTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBusinessCombinationDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsBusinessCombinationDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsInventoryDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsInventoryDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPrepaidAndOtherCurrentAssetsDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsGoodwillAndIntangibleAssetsDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsPropertyPlantAndEquipmentDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsAccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDebtDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsFinancialInstrumentsDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsStockholdersEquityNoteDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsRevenueFromContractWithCustomerTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsDisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsLeasesOfLesseeDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCompensationAndEmployeeBenefitPlansOtherThanShareBasedCompensationTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsIncomeTaxDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsIncomeTaxDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSegmentReportingDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsSeasonalityDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsCommitmentsAndContingenciesDisclosureTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsQuarterlyFinancialInformationTextBlock">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsQuarterlyFinancialInformationTextBlockTables">
  </calculationLink>
  <calculationLink xlink:type="extended" xlink:role="http://www.trex.com/taxonomy/role/NotesToFinancialStatementsScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock">
  </calculationLink>
</linkbase>
