Compare Stocks

2 / 10
Try these comparisons:

Stock Comparison

NX vs TREX

Revenue, margins, valuation, and 5-year total return — side by side.

Live fundamentals10-year financials5-year price chart
NX
Quanex Building Products Corporation

Construction

IndustrialsNYSE • US
Market Cap$916M
5Y Perf.+61.8%
TREX
Trex Company, Inc.

Construction

IndustrialsNYSE • US
Market Cap$4.12B
5Y Perf.-34.8%

NX vs TREX — Key Financials

Market cap, revenue, margins, and valuation side-by-side.

Company Snapshot
NX logoNX
TREX logoTREX
IndustryConstructionConstruction
Market Cap$916M$4.12B
Revenue (TTM)$1.85B$1.18B
Net Income (TTM)$-240M$191M
Gross Margin26.1%39.2%
Operating Margin-10.0%22.1%
Forward P/E10.0x24.0x
Total Debt$854M$229M
Cash & Equiv.$76M$4M

NX vs TREXLong-Term Stock Performance

Price return indexed to 100 at period start. Dividends excluded.

NX
TREX
StockMay 20May 26Return
Quanex Building Pro… (NX)100161.8+61.8%
Trex Company, Inc. (TREX)10065.2-34.8%

Price return only. Dividends and distributions are not included.

Quick Verdict: NX vs TREX

Each card shows where this stock fits in a portfolio — not just who wins on paper.

Bottom line: NX leads in 4 of 7 categories, making it the strongest pick for growth and revenue expansion and valuation and capital efficiency. Trex Company, Inc. is the stronger pick specifically for profitability and margin quality and capital preservation and lower volatility. As sector peers, any of these can serve as alternatives in the same allocation.
NX
Quanex Building Products Corporation
The Growth Play

NX carries the broadest edge in this set and is the clearest fit for growth exposure.

  • Rev growth 43.8%, EPS growth -7.0%, 3Y rev CAGR 14.6%
  • 43.8% revenue growth vs TREX's 2.0%
  • Lower P/E (10.0x vs 24.0x)
Best for: growth exposure
TREX
Trex Company, Inc.
The Income Pick

TREX is the clearest fit if your priority is income & stability and long-term compounding.

  • Dividend streak 2 yrs, beta 1.47
  • 239.9% 10Y total return vs NX's 23.7%
  • Lower volatility, beta 1.47, Low D/E 22.1%, current ratio 1.24x
Best for: income & stability and long-term compounding
See the full category breakdown
CategoryWinnerWhy
GrowthNX logoNX43.8% revenue growth vs TREX's 2.0%
ValueNX logoNXLower P/E (10.0x vs 24.0x)
Quality / MarginsTREX logoTREX16.3% margin vs NX's -13.0%
Stability / SafetyTREX logoTREXBeta 1.47 vs NX's 1.89, lower leverage
DividendsNX logoNX1.6% yield; the other pay no meaningful dividend
Momentum (1Y)NX logoNX+23.2% vs TREX's -30.8%
Efficiency (ROA)TREX logoTREX12.3% ROA vs NX's -11.7%, ROIC 16.4% vs -8.8%

NX vs TREX — Revenue Breakdown by Segment

How each company's revenue is distributed across its business units

NXQuanex Building Products Corporation
FY 2024
NA Engineered Components
60.2%$650M
EU Engineered Components
21.4%$231M
NA Cabinet Components
18.4%$198M
TREXTrex Company, Inc.

Segment breakdown not available.

NX vs TREX — Financial Metrics

Side-by-side numbers across 2 stocks — who leads on profitability, valuation, growth, and risk.

BEST OVERALLTREXLAGGINGNX

Income & Cash Flow (Last 12 Months)

TREX leads this category, winning 4 of 6 comparable metrics.

NX is the larger business by revenue, generating $1.8B annually — 1.6x TREX's $1.2B. TREX is the more profitable business, keeping 16.3% of every revenue dollar as net income compared to NX's -13.0%.

MetricNX logoNXQuanex Building P…TREX logoTREXTrex Company, Inc.
RevenueTrailing 12 months$1.8B$1.2B
EBITDAEarnings before interest/tax-$81M$309M
Net IncomeAfter-tax profit-$240M$191M
Free Cash FlowCash after capex$95M$263M
Gross MarginGross profit ÷ Revenue+26.1%+39.2%
Operating MarginEBIT ÷ Revenue-10.0%+22.1%
Net MarginNet income ÷ Revenue-13.0%+16.3%
FCF MarginFCF ÷ Revenue+5.1%+22.3%
Rev. Growth (YoY)Latest quarter vs prior year+2.3%+1.0%
EPS Growth (YoY)Latest quarter vs prior year+71.9%+3.6%
TREX leads this category, winning 4 of 6 comparable metrics.

Valuation Metrics

NX leads this category, winning 5 of 5 comparable metrics.
MetricNX logoNXQuanex Building P…TREX logoTREXTrex Company, Inc.
Market CapShares × price$916M$4.1B
Enterprise ValueMkt cap + debt − cash$1.7B$4.3B
Trailing P/EPrice ÷ TTM EPS-3.70x22.00x
Forward P/EPrice ÷ next-FY EPS est.9.99x23.95x
PEG RatioP/E ÷ EPS growth rate6.58x
EV / EBITDAEnterprise value multiple13.53x
Price / SalesMarket cap ÷ Revenue0.50x3.51x
Price / BookPrice ÷ Book value/share1.28x4.05x
Price / FCFMarket cap ÷ FCF8.96x30.60x
NX leads this category, winning 5 of 5 comparable metrics.

Profitability & Efficiency

TREX leads this category, winning 8 of 8 comparable metrics.

TREX delivers a 18.8% return on equity — every $100 of shareholder capital generates $19 in annual profit, vs $-30 for NX. TREX carries lower financial leverage with a 0.22x debt-to-equity ratio, signaling a more conservative balance sheet compared to NX's 1.18x. On the Piotroski fundamental quality scale (0–9), TREX scores 6/9 vs NX's 4/9, reflecting solid financial health.

MetricNX logoNXQuanex Building P…TREX logoTREXTrex Company, Inc.
ROE (TTM)Return on equity-30.2%+18.8%
ROA (TTM)Return on assets-11.7%+12.3%
ROICReturn on invested capital-8.8%+16.4%
ROCEReturn on capital employed-10.4%+23.2%
Piotroski ScoreFundamental quality 0–946
Debt / EquityFinancial leverage1.18x0.22x
Net DebtTotal debt minus cash$778M$225M
Cash & Equiv.Liquid assets$76M$4M
Total DebtShort + long-term debt$854M$229M
Interest CoverageEBIT ÷ Interest expense-3.30x
TREX leads this category, winning 8 of 8 comparable metrics.

Total Returns (Dividends Reinvested)

NX leads this category, winning 5 of 6 comparable metrics.

A $10,000 investment in NX five years ago would be worth $7,802 today (with dividends reinvested), compared to $3,599 for TREX. Over the past 12 months, NX leads with a +23.2% total return vs TREX's -30.8%. The 3-year compound annual growth rate (CAGR) favors NX at 2.0% vs TREX's -11.4% — a key indicator of consistent wealth creation.

MetricNX logoNXQuanex Building P…TREX logoTREXTrex Company, Inc.
YTD ReturnYear-to-date+31.1%+9.3%
1-Year ReturnPast 12 months+23.2%-30.8%
3-Year ReturnCumulative with dividends+6.0%-30.4%
5-Year ReturnCumulative with dividends-22.0%-64.0%
10-Year ReturnCumulative with dividends+23.7%+239.9%
CAGR (3Y)Annualised 3-year return+2.0%-11.4%
NX leads this category, winning 5 of 6 comparable metrics.

Risk & Volatility

Evenly matched — NX and TREX each lead in 1 of 2 comparable metrics.

TREX is the less volatile stock with a 1.47 beta — it tends to amplify market swings less than NX's 1.89 beta. A beta below 1.0 means the stock typically moves less than the S&P 500. NX currently trades 87.3% from its 52-week high vs TREX's 56.9% drawdown — a narrower gap to the peak suggests stronger recent price momentum.

MetricNX logoNXQuanex Building P…TREX logoTREXTrex Company, Inc.
Beta (5Y)Sensitivity to S&P 5001.89x1.47x
52-Week HighHighest price in past year$22.98$68.78
52-Week LowLowest price in past year$11.04$29.77
% of 52W HighCurrent price vs 52-week peak+87.3%+56.9%
RSI (14)Momentum oscillator 0–10054.651.3
Avg Volume (50D)Average daily shares traded458K1.7M
Evenly matched — NX and TREX each lead in 1 of 2 comparable metrics.

Analyst Outlook

TREX leads this category, winning 1 of 1 comparable metric.

Wall Street rates NX as "Hold" and TREX as "Hold". NX is the only dividend payer here at 1.61% yield — a key consideration for income-focused portfolios.

MetricNX logoNXQuanex Building P…TREX logoTREXTrex Company, Inc.
Analyst RatingConsensus buy/hold/sellHoldHold
Price TargetConsensus 12-month target$44.50
# AnalystsCovering analysts1031
Dividend YieldAnnual dividend ÷ price+1.6%
Dividend StreakConsecutive years of raises02
Dividend / ShareAnnual DPS$0.32
Buyback YieldShare repurchases ÷ mkt cap+3.5%+1.3%
TREX leads this category, winning 1 of 1 comparable metric.
Key Takeaway

TREX leads in 3 of 6 categories (Income & Cash Flow, Profitability & Efficiency). NX leads in 2 (Valuation Metrics, Total Returns). 1 tied.

Best OverallTrex Company, Inc. (TREX)Leads 3 of 6 categories
Loading custom metrics...

NX vs TREX: Frequently Asked Questions

10 questions · data-driven answers · updated daily

01

Is NX or TREX a better buy right now?

For growth investors, Quanex Building Products Corporation (NX) is the stronger pick with 43.

8% revenue growth year-over-year, versus 2. 0% for Trex Company, Inc. (TREX). Trex Company, Inc. (TREX) offers the better valuation at 22. 0x trailing P/E (24. 0x forward), making it the more compelling value choice. Analysts rate Quanex Building Products Corporation (NX) a "Hold" — based on 10 analyst ratings — the highest consensus in this comparison. The "better buy" depends entirely on your goals: growth investors should weight revenue trajectory, value investors should weight P/E and PEG, and income investors should weight dividend yield and streak.

02

Which has the better valuation — NX or TREX?

On forward P/E, Quanex Building Products Corporation is actually cheaper at 10.

0x — notably different from the trailing picture, reflecting expected earnings growth.

03

Which is the better long-term investment — NX or TREX?

Over the past 5 years, Quanex Building Products Corporation (NX) delivered a total return of -22.

0%, compared to -64. 0% for Trex Company, Inc. (TREX). Over 10 years, the gap is even starker: TREX returned +239. 9% versus NX's +23. 7%. Past returns do not guarantee future results, and the stock with the higher historical return may already have its best growth priced in.

04

Which is safer — NX or TREX?

By beta (market sensitivity over 5 years), Trex Company, Inc.

(TREX) is the lower-risk stock at 1. 47β versus Quanex Building Products Corporation's 1. 89β — meaning NX is approximately 29% more volatile than TREX relative to the S&P 500. On balance sheet safety, Trex Company, Inc. (TREX) carries a lower debt/equity ratio of 22% versus 118% for Quanex Building Products Corporation — giving it more financial flexibility in a downturn.

05

Which is growing faster — NX or TREX?

By revenue growth (latest reported year), Quanex Building Products Corporation (NX) is pulling ahead at 43.

8% versus 2. 0% for Trex Company, Inc. (TREX). On earnings-per-share growth, the picture is similar: Trex Company, Inc. grew EPS -14. 8% year-over-year, compared to -703. 3% for Quanex Building Products Corporation. Over a 3-year CAGR, NX leads at 14. 6% annualised revenue growth. Higher growth typically commands a higher valuation multiple — check whether the premium P/E or P/S is justified by the growth rate using the PEG ratio.

06

Which has better profit margins — NX or TREX?

Trex Company, Inc.

(TREX) is the more profitable company, earning 16. 2% net margin versus -13. 6% for Quanex Building Products Corporation — meaning it keeps 16. 2% of every revenue dollar as bottom-line profit. Operating margin tells a similar story: TREX leads at 22. 0% versus -10. 6% for NX. At the gross margin level — before operating expenses — TREX leads at 39. 2%, reflecting greater pricing power or product mix advantage. Stronger margins indicate durable pricing power, lower cost of revenue, or higher mix of software/services. They are one of the clearest signs of business quality.

07

Is NX or TREX more undervalued right now?

On forward earnings alone, Quanex Building Products Corporation (NX) trades at 10.

0x forward P/E versus 24. 0x for Trex Company, Inc. — 14. 0x cheaper on a one-year earnings basis.

08

Which pays a better dividend — NX or TREX?

In this comparison, NX (1.

6% yield) pays a dividend. TREX does not pay a meaningful dividend and should not be held primarily for income.

09

Is NX or TREX better for a retirement portfolio?

For long-horizon retirement investors, Trex Company, Inc.

(TREX) is the stronger choice — it scores higher on the combination of lower volatility, dividend reliability, and long-term compounding (+239. 9% 10Y return). Quanex Building Products Corporation (NX) carries a higher beta of 1. 89 — meaning larger drawdowns in market downturns, which matters significantly when you cannot wait years for a recovery. Both have compounded well over 10 years (TREX: +239. 9%, NX: +23. 7%), confirming both are viable long-term holds — but the lower-volatility option typically results in less emotional selling during corrections. Retirement portfolios generally favour predictability over maximum returns. Consult a financial advisor before making allocation decisions.

10

What are the main differences between NX and TREX?

Both stocks operate in the Industrials sector, making this a peer-level intra-sector comparison — the same macro tailwinds and headwinds will affect both.

In terms of investment character: NX is a small-cap high-growth stock; TREX is a small-cap quality compounder stock. NX pays a dividend while TREX does not, making them suitable for different income and tax situations. These fundamental differences mean investors should not choose between them on a single metric — the "better stock" depends entirely on which of these characteristics aligns with your investment strategy.

Find Stocks Like These

Explore pre-built screens for each stock's profile, or build a custom screen to find stocks that outperform both.

Stocks Like

NX

Income & Dividend Stock

  • Sector: Industrials
  • Market Cap > $100B
  • Gross Margin > 15%
  • Dividend Yield > 0.6%
Run This Screen
Stocks Like

TREX

Quality Business

  • Sector: Industrials
  • Market Cap > $100B
  • Net Margin > 9%
Run This Screen
Custom Screen

Beat Both

Find stocks that outperform NX and TREX on the metrics below

Revenue Growth>
%
(NX: 2.3% · TREX: 1.0%)

You Might Also Compare

Based on how these companies actually compete and overlap — not just which sector they're filed under.