{
  "cik": 1069878,
  "cik_padded": "0001069878",
  "entityName": "TREX CO INC",
  "fiscal_years": [
    {
      "accn": "0001193125-26-068732",
      "filed": "2026-02-25",
      "fiscal_year": 2025,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 54472000.0,
        "capex": 223592000.0,
        "cash": 3807000.0,
        "cost_of_revenue": 714303000.0,
        "eps_diluted": 1.78,
        "free_cash_flow": 134521000.0,
        "gross_profit": 459964000.0,
        "net_income": 190415000.0,
        "operating_cash_flow": 358113000.0,
        "operating_income": 257961000.0,
        "revenue": 1174267000.0,
        "stockholders_equity": 1034264000.0,
        "total_assets": 1453441000.0,
        "total_liabilities": 419177000.0
      },
      "period_end": "2025-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.3917030794529694,
        "leverage": 0.40529013868799457,
        "net_margin": 0.16215647718959997,
        "operating_margin": 0.21967831847441852,
        "revenue_growth_yoy": 0.019816770000234487,
        "roa_avg2y": 0.1346922693859535,
        "roa_period_end": 0.13100978987107148,
        "roe_avg2y": 0.19820567214950857,
        "roe_period_end": 0.18410676577740306
      }
    },
    {
      "accn": "0001193125-26-068732",
      "filed": "2026-02-25",
      "fiscal_year": 2024,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 105940000.0,
        "capex": 232337000.0,
        "cash": 1292000.0,
        "cost_of_revenue": 649551000.0,
        "eps_diluted": 2.2,
        "free_cash_flow": -88408000.0,
        "gross_profit": 501898000.0,
        "net_income": 238446000.0,
        "operating_cash_flow": 143929000.0,
        "operating_income": 321903000.0,
        "revenue": 1151449000.0,
        "stockholders_equity": 887124000.0,
        "total_assets": 1373967000.0,
        "total_liabilities": 486843000.0
      },
      "period_end": "2024-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.4358838298526465,
        "leverage": 0.5487879935612158,
        "net_margin": 0.20708342271346802,
        "operating_margin": 0.27956340228703136,
        "revenue_growth_yoy": 0.05170815381650419,
        "roa_avg2y": 0.20672847672932637,
        "roa_period_end": 0.17354565284319057,
        "roe_avg2y": 0.2928011699963714,
        "roe_period_end": 0.2687854234582764
      }
    },
    {
      "accn": "0001193125-26-068732",
      "filed": "2026-02-25",
      "fiscal_year": 2023,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 18450000.0,
        "capex": 166089000.0,
        "cash": 1959000.0,
        "cost_of_revenue": 644042000.0,
        "eps_diluted": 1.88,
        "free_cash_flow": 223331000.0,
        "gross_profit": 450795000.0,
        "net_income": 204119000.0,
        "operating_cash_flow": 389420000.0,
        "operating_income": 274592000.0,
        "revenue": 1094837000.0,
        "stockholders_equity": 741599000.0,
        "total_assets": 932885000.0,
        "total_liabilities": 216214000.0
      },
      "period_end": "2023-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.4117462234104255,
        "leverage": 0.29155109432456083,
        "net_margin": 0.18643779850333886,
        "operating_margin": 0.25080628440580655,
        "revenue_growth_yoy": -0.010131613327872425,
        "roa_avg2y": 0.21870791121778216,
        "roa_period_end": 0.2188040326513986,
        "roe_avg2y": 0.3174130985638433,
        "roe_period_end": 0.2752417411566089
      }
    },
    {
      "accn": "0001193125-26-068732",
      "filed": "2026-02-25",
      "fiscal_year": 2022,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 398382000.0,
        "capex": 176228000.0,
        "cash": 12325000.0,
        "cost_of_revenue": 702054000.0,
        "eps_diluted": 1.65,
        "free_cash_flow": 39992000.0,
        "gross_profit": 403989000.0,
        "net_income": 184626000.0,
        "operating_cash_flow": 216220000.0,
        "operating_income": 246735000.0,
        "revenue": 1106043000.0,
        "stockholders_equity": 544542000.0,
        "total_assets": 933705000.0,
        "total_liabilities": 415356000.0
      },
      "period_end": "2022-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.365256142844356,
        "leverage": 0.7627621009949646,
        "net_margin": 0.1669247940631603,
        "operating_margin": 0.2230790303812781,
        "revenue_growth_yoy": -0.0759504140516913,
        "roa_avg2y": 0.19916225554549935,
        "roa_period_end": 0.19773483059424554,
        "roe_avg2y": 0.29084670787727557,
        "roe_period_end": 0.33904822768491694
      }
    },
    {
      "accn": "0001193125-24-046315",
      "filed": "2025-02-24",
      "fiscal_year": 2021,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 82473000.0,
        "capex": 159394000.0,
        "cash": 141053000.0,
        "cost_of_revenue": 736448000.0,
        "eps_diluted": 1.8,
        "free_cash_flow": 98670000.0,
        "gross_profit": 460504000.0,
        "net_income": 208737000.0,
        "operating_cash_flow": 258064000.0,
        "operating_income": 275376000.0,
        "revenue": 1196952000.0,
        "stockholders_equity": 725034000.0,
        "total_assets": 920321000.0,
        "total_liabilities": 195287000.0
      },
      "period_end": "2021-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.38473054892760944,
        "leverage": 0.2693487477828626,
        "net_margin": 0.1743904517474385,
        "operating_margin": 0.23006436348324744,
        "revenue_growth_yoy": 0.3588895032077663,
        "roa_avg2y": 0.2469072570414351,
        "roa_period_end": 0.22680890689226912,
        "roe_avg2y": 0.31781754233707504,
        "roe_period_end": 0.28789960194970166
      }
    },
    {
      "accn": "0001193125-24-046315",
      "filed": "2024-02-26",
      "fiscal_year": 2020,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 44854000.0,
        "capex": 172823000.0,
        "cash": 121701000.0,
        "cost_of_revenue": 521374000.0,
        "eps_diluted": 1.51,
        "free_cash_flow": 14471000.0,
        "gross_profit": 359457000.0,
        "net_income": 175631000.0,
        "operating_cash_flow": 187294000.0,
        "operating_income": 233635000.0,
        "revenue": 880831000.0,
        "stockholders_equity": 588531000.0,
        "total_assets": 770492000.0,
        "total_liabilities": 181961000.0
      },
      "period_end": "2020-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.40808849824767746,
        "leverage": 0.30917827608061427,
        "net_margin": 0.19939239195714048,
        "operating_margin": 0.26524384359769354,
        "revenue_growth_yoy": 0.18177305335635616,
        "roa_avg2y": 0.2577632709610334,
        "roa_period_end": 0.2279465588221552,
        "roe_avg2y": 0.3384985728134944,
        "roe_period_end": 0.29842268291729745
      }
    },
    {
      "accn": "0001193125-23-051000",
      "filed": "2023-02-27",
      "fiscal_year": 2019,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 46545000.0,
        "capex": 67265000.0,
        "cash": 148833000.0,
        "cost_of_revenue": 438844000.0,
        "eps_diluted": 1.24,
        "free_cash_flow": 89087000.0,
        "gross_profit": 306503000.0,
        "net_income": 144738000.0,
        "operating_cash_flow": 156352000.0,
        "operating_income": 188199000.0,
        "revenue": 745347000.0,
        "stockholders_equity": 449175000.0,
        "total_assets": 592239000.0,
        "total_liabilities": 143064000.0
      },
      "period_end": "2019-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.4112218872551979,
        "leverage": 0.31850392386041076,
        "net_margin": 0.19418874698630303,
        "operating_margin": 0.25249850069833246,
        "revenue_growth_yoy": 0.08929046401169163,
        "roa_avg2y": 0.2737721553944206,
        "roa_period_end": 0.24439120017425398,
        "roe_avg2y": 0.3654363254887406,
        "roe_period_end": 0.3222307563867089
      }
    },
    {
      "accn": "0001193125-22-058229",
      "filed": "2022-02-28",
      "fiscal_year": 2018,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 30085000.0,
        "capex": 33816000.0,
        "cash": 105699000.0,
        "cost_of_revenue": 389356000.0,
        "eps_diluted": 1.14,
        "free_cash_flow": 104305000.0,
        "gross_profit": 294894000.0,
        "net_income": 134572000.0,
        "operating_cash_flow": 138121000.0,
        "operating_income": 176669000.0,
        "revenue": 684250000.0,
        "stockholders_equity": 342963000.0,
        "total_assets": 465122000.0,
        "total_liabilities": 122159000.0
      },
      "period_end": "2018-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.4309740591888929,
        "leverage": 0.356187110562947,
        "net_margin": 0.19667080745341614,
        "operating_margin": 0.2581936426744611,
        "revenue_growth_yoy": 0.21073408439838415,
        "roa_avg2y": 0.3401078411674242,
        "roa_period_end": 0.28932624128723217,
        "roe_avg2y": 0.4687180541018751,
        "roe_period_end": 0.3923805191813694
      }
    },
    {
      "accn": "0001193125-21-050916",
      "filed": "2021-02-22",
      "fiscal_year": 2017,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 3617000.0,
        "capex": 15040000.0,
        "cash": 30514000.0,
        "cost_of_revenue": 321780000.0,
        "eps_diluted": 1.61,
        "free_cash_flow": 86825000.0,
        "gross_profit": 243373000.0,
        "net_income": 95128000.0,
        "operating_cash_flow": 101865000.0,
        "operating_income": 142380000.0,
        "revenue": 565153000.0,
        "stockholders_equity": 231250000.0,
        "total_assets": 326227000.0,
        "total_liabilities": 94977000.0
      },
      "period_end": "2017-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "revenue_growth_yoy": "ratio",
        "roa_avg2y": "ratio",
        "roa_period_end": "ratio",
        "roe_avg2y": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.43063205892917494,
        "leverage": 0.41071135135135134,
        "net_margin": 0.16832256043938543,
        "operating_margin": 0.25193177776637476,
        "revenue_growth_yoy": 0.17834475914064585,
        "roa_avg2y": 0.3473999236748549,
        "roa_period_end": 0.29160063391442154,
        "roe_avg2y": 0.5206630342272126,
        "roe_period_end": 0.41136432432432435
      }
    },
    {
      "accn": "0001193125-20-046696",
      "filed": "2020-02-24",
      "fiscal_year": 2016,
      "form": "10-K",
      "fundamental_units": {
        "buybacks": "USD",
        "capex": "USD",
        "cash": "USD",
        "cost_of_revenue": "USD",
        "eps_diluted": "USD/shares",
        "free_cash_flow": "USD",
        "gross_profit": "USD",
        "net_income": "USD",
        "operating_cash_flow": "USD",
        "operating_income": "USD",
        "revenue": "USD",
        "stockholders_equity": "USD",
        "total_assets": "USD",
        "total_liabilities": "USD"
      },
      "fundamentals": {
        "buybacks": 55216000.0,
        "capex": 14551000.0,
        "cash": 18664000.0,
        "cost_of_revenue": 292521000.0,
        "eps_diluted": 1.15,
        "free_cash_flow": 70742000.0,
        "gross_profit": 187095000.0,
        "net_income": 67847000.0,
        "operating_cash_flow": 85293000.0,
        "operating_income": 103955000.0,
        "revenue": 479616000.0,
        "stockholders_equity": 134161000.0,
        "total_assets": 221430000.0,
        "total_liabilities": 87269000.0
      },
      "period_end": "2016-12-31",
      "ratio_units": {
        "gross_margin": "ratio",
        "leverage": "ratio",
        "net_margin": "ratio",
        "operating_margin": "ratio",
        "roa_period_end": "ratio",
        "roe_period_end": "ratio"
      },
      "ratios": {
        "gross_margin": 0.3900933246597278,
        "leverage": 0.6504796475876,
        "net_margin": 0.14146108553509473,
        "operating_margin": 0.21674631371764078,
        "roa_period_end": 0.3064038296527119,
        "roe_period_end": 0.505713284784699
      }
    }
  ],
  "latest_filing": {
    "accn": "0001193125-26-068732",
    "filed": "2026-02-25",
    "form": "10-K"
  },
  "note": "Static grepcent export of verified SEC companyfacts-derived values. Monetary values are raw reported units from grepcent's resolved facts; no scaling and no FX conversion. Capex, dividends, and buybacks are reported as positive outflow magnitudes. ROE/ROA include both period-end basis (site-consistent) and average-of-two-years basis where the prior-year denominator exists.",
  "schema_version": "1",
  "sic": "2400",
  "sic_description": "Lumber & Wood Products (No Furniture)",
  "source_urls": {
    "sec_companyfacts": "https://data.sec.gov/api/xbrl/companyfacts/CIK0001069878.json",
    "sec_submissions": "https://data.sec.gov/submissions/CIK0001069878.json"
  },
  "ticker": "TREX"
}
