Compare Stocks

4 / 10
Try these comparisons:

Stock Comparison

CGNX vs KEYS vs TRMB vs MKSI

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

Live fundamentals10-year financials5-year price chart
CGNX
Cognex Corporation

Hardware, Equipment & Parts

TechnologyNASDAQ • US
Market Cap$11.01B
5Y Perf.+16.2%
KEYS
Keysight Technologies, Inc.

Hardware, Equipment & Parts

TechnologyNYSE • US
Market Cap$60.85B
5Y Perf.+228.1%
TRMB
Trimble Inc.

Hardware, Equipment & Parts

TechnologyNASDAQ • US
Market Cap$14.65B
5Y Perf.+58.1%
MKSI
MKS Inc.

Hardware, Equipment & Parts

TechnologyNASDAQ • US
Market Cap$20.25B
5Y Perf.+184.8%

CGNX vs KEYS vs TRMB vs MKSI — Key Financials

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

Company Snapshot
CGNX logoCGNX
KEYS logoKEYS
TRMB logoTRMB
MKSI logoMKSI
IndustryHardware, Equipment & PartsHardware, Equipment & PartsHardware, Equipment & PartsHardware, Equipment & Parts
Market Cap$11.01B$60.85B$14.65B$20.25B
Revenue (TTM)$1.05B$5.68B$3.69B$4.07B
Net Income (TTM)$143M$958M$456M$327M
Gross Margin68.0%61.9%68.8%45.2%
Operating Margin18.8%16.0%17.7%14.8%
Forward P/E53.0x39.8x20.0x30.4x
Total Debt$77M$2.97B$1.39B$4.69B
Cash & Equiv.$263M$1.87B$253M$675M

CGNX vs KEYS vs TRMB vs MKSILong-Term Stock Performance

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

CGNX
KEYS
TRMB
MKSI
StockMay 20May 26Return
Cognex Corporation (CGNX)100116.2+16.2%
Keysight Technologi… (KEYS)100328.1+228.1%
Trimble Inc. (TRMB)100158.1+58.1%
MKS Inc. (MKSI)100284.8+184.8%

Price return only. Dividends and distributions are not included.

Quick Verdict: CGNX vs KEYS vs TRMB vs MKSI

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

Bottom line: KEYS leads in 3 of 7 categories, making it the strongest pick for valuation and capital efficiency and profitability and margin quality. MKS Inc. is the stronger pick specifically for growth and revenue expansion and recent price momentum and sentiment. CGNX and TRMB also each lead in at least one category. As sector peers, any of these can serve as alternatives in the same allocation.
CGNX
Cognex Corporation
The Income Pick

CGNX is the clearest fit if your priority is income & stability and sleep-well-at-night.

  • Dividend streak 4 yrs, beta 1.50, yield 0.5%
  • Lower volatility, beta 1.50, Low D/E 5.1%, current ratio 3.80x
  • Beta 1.50, yield 0.5%, current ratio 3.80x
  • 0.5% yield, 4-year raise streak, vs MKSI's 0.3%, (2 stocks pay no dividend)
Best for: income & stability and sleep-well-at-night
KEYS
Keysight Technologies, Inc.
The Long-Run Compounder

KEYS carries the broadest edge in this set and is the clearest fit for long-term compounding and valuation efficiency.

  • 12.8% 10Y total return vs MKSI's 7.5%
  • PEG 4.97 vs TRMB's 8.15
  • Lower P/E (39.8x vs 53.0x)
  • 16.9% margin vs MKSI's 8.0%
Best for: long-term compounding and valuation efficiency
TRMB
Trimble Inc.
The Defensive Choice

TRMB is the clearest fit if your priority is stability.

  • Beta 1.46 vs MKSI's 2.64, lower leverage
Best for: stability
MKSI
MKS Inc.
The Growth Play

MKSI is the #2 pick in this set and the best alternative if growth exposure is your priority.

  • Rev growth 9.6%, EPS growth 55.5%, 3Y rev CAGR 3.5%
  • 9.6% revenue growth vs TRMB's -2.6%
  • +306.1% vs TRMB's -6.7%
Best for: growth exposure
See the full category breakdown
CategoryWinnerWhy
GrowthMKSI logoMKSI9.6% revenue growth vs TRMB's -2.6%
ValueKEYS logoKEYSLower P/E (39.8x vs 53.0x)
Quality / MarginsKEYS logoKEYS16.9% margin vs MKSI's 8.0%
Stability / SafetyTRMB logoTRMBBeta 1.46 vs MKSI's 2.64, lower leverage
DividendsCGNX logoCGNX0.5% yield, 4-year raise streak, vs MKSI's 0.3%, (2 stocks pay no dividend)
Momentum (1Y)MKSI logoMKSI+306.1% vs TRMB's -6.7%
Efficiency (ROA)KEYS logoKEYS8.3% ROA vs MKSI's 3.7%, ROIC 11.5% vs 6.5%

CGNX vs KEYS vs TRMB vs MKSI — Revenue Breakdown by Segment

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

CGNXCognex Corporation
FY 2025
Standard Product and Services
88.5%$880M
Application of Customer Specific Solutions
11.5%$114M
KEYSKeysight Technologies, Inc.
FY 2024
Communications Solutions Group
68.7%$3.4B
Electronic Industrial Solutions Group
31.3%$1.6B
TRMBTrimble Inc.
FY 2025
Service
68.4%$2.5B
Product
31.6%$1.1B
MKSIMKS Inc.
FY 2025
Product
87.4%$3.4B
Service
12.6%$495M

CGNX vs KEYS vs TRMB vs MKSI — Financial Metrics

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

BEST OVERALLCGNXLAGGINGKEYS

Income & Cash Flow (Last 12 Months)

CGNX leads this category, winning 3 of 6 comparable metrics.

KEYS is the larger business by revenue, generating $5.7B annually — 5.4x CGNX's $1.0B. KEYS is the more profitable business, keeping 16.9% of every revenue dollar as net income compared to MKSI's 8.0%. On growth, CGNX holds the edge at +24.3% YoY revenue growth, suggesting stronger near-term business momentum.

MetricCGNX logoCGNXCognex CorporationKEYS logoKEYSKeysight Technolo…TRMB logoTRMBTrimble Inc.MKSI logoMKSIMKS Inc.
RevenueTrailing 12 months$1.0B$5.7B$3.7B$4.1B
EBITDAEarnings before interest/tax$219M$1.2B$785M$945M
Net IncomeAfter-tax profit$143M$958M$456M$327M
Free Cash FlowCash after capex$241M$1.5B$253M$401M
Gross MarginGross profit ÷ Revenue+68.0%+61.9%+68.8%+45.2%
Operating MarginEBIT ÷ Revenue+18.8%+16.0%+17.7%+14.8%
Net MarginNet income ÷ Revenue+13.6%+16.9%+12.4%+8.0%
FCF MarginFCF ÷ Revenue+23.0%+25.8%+6.9%+9.8%
Rev. Growth (YoY)Latest quarter vs prior year+24.3%+23.3%+11.8%+15.2%
EPS Growth (YoY)Latest quarter vs prior year+121.4%+68.0%+55.6%+53.2%
CGNX leads this category, winning 3 of 6 comparable metrics.

Valuation Metrics

TRMB leads this category, winning 5 of 7 comparable metrics.

At 35.3x trailing earnings, TRMB trades at a 64% valuation discount to CGNX's 96.9x P/E. Adjusting for growth (PEG ratio), KEYS offers better value at 9.08x vs TRMB's 14.39x — a lower PEG means you pay less per unit of expected earnings growth.

MetricCGNX logoCGNXCognex CorporationKEYS logoKEYSKeysight Technolo…TRMB logoTRMBTrimble Inc.MKSI logoMKSIMKS Inc.
Market CapShares × price$11.0B$60.9B$14.7B$20.2B
Enterprise ValueMkt cap + debt − cash$10.8B$62.0B$15.8B$24.3B
Trailing P/EPrice ÷ TTM EPS96.92x72.70x35.34x68.83x
Forward P/EPrice ÷ next-FY EPS est.53.05x39.84x20.01x30.36x
PEG RatioP/E ÷ EPS growth rate9.08x14.39x
EV / EBITDAEnterprise value multiple55.96x50.65x20.05x26.70x
Price / SalesMarket cap ÷ Revenue11.07x11.32x4.08x5.15x
Price / BookPrice ÷ Book value/share7.48x10.44x2.54x7.49x
Price / FCFMarket cap ÷ FCF46.49x47.50x110.00x40.74x
TRMB leads this category, winning 5 of 7 comparable metrics.

Profitability & Efficiency

Evenly matched — CGNX and KEYS each lead in 4 of 9 comparable metrics.

KEYS delivers a 15.4% return on equity — every $100 of shareholder capital generates $15 in annual profit, vs $8 for TRMB. CGNX carries lower financial leverage with a 0.05x debt-to-equity ratio, signaling a more conservative balance sheet compared to MKSI's 1.73x. On the Piotroski fundamental quality scale (0–9), CGNX scores 7/9 vs TRMB's 5/9, reflecting strong financial health.

MetricCGNX logoCGNXCognex CorporationKEYS logoKEYSKeysight Technolo…TRMB logoTRMBTrimble Inc.MKSI logoMKSIMKS Inc.
ROE (TTM)Return on equity+9.6%+15.4%+8.0%+12.2%
ROA (TTM)Return on assets+7.1%+8.3%+5.0%+3.7%
ROICReturn on invested capital+9.0%+11.5%+6.8%+6.5%
ROCEReturn on capital employed+8.9%+11.0%+7.8%+7.2%
Piotroski ScoreFundamental quality 0–97556
Debt / EquityFinancial leverage0.05x0.51x0.24x1.73x
Net DebtTotal debt minus cash-$186M$1.1B$1.1B$4.0B
Cash & Equiv.Liquid assets$263M$1.9B$253M$675M
Total DebtShort + long-term debt$77M$3.0B$1.4B$4.7B
Interest CoverageEBIT ÷ Interest expense11.03x12.26x2.84x
Evenly matched — CGNX and KEYS each lead in 4 of 9 comparable metrics.

Total Returns (Dividends Reinvested)

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

A $10,000 investment in KEYS five years ago would be worth $24,740 today (with dividends reinvested), compared to $7,797 for TRMB. Over the past 12 months, MKSI leads with a +306.1% total return vs TRMB's -6.7%. The 3-year compound annual growth rate (CAGR) favors MKSI at 54.1% vs TRMB's 9.2% — a key indicator of consistent wealth creation.

MetricCGNX logoCGNXCognex CorporationKEYS logoKEYSKeysight Technolo…TRMB logoTRMBTrimble Inc.MKSI logoMKSIMKS Inc.
YTD ReturnYear-to-date+78.7%+71.7%-21.0%+78.8%
1-Year ReturnPast 12 months+133.1%+137.2%-6.7%+306.1%
3-Year ReturnCumulative with dividends+34.7%+147.9%+30.1%+266.0%
5-Year ReturnCumulative with dividends-13.2%+147.4%-22.0%+66.5%
10-Year ReturnCumulative with dividends+249.6%+1279.4%+166.8%+750.6%
CAGR (3Y)Annualised 3-year return+10.4%+35.3%+9.2%+54.1%
MKSI leads this category, winning 4 of 6 comparable metrics.

Risk & Volatility

Evenly matched — KEYS and TRMB each lead in 1 of 2 comparable metrics.

TRMB is the less volatile stock with a 1.46 beta — it tends to amplify market swings less than MKSI's 2.64 beta. A beta below 1.0 means the stock typically moves less than the S&P 500. KEYS currently trades 96.6% from its 52-week high vs TRMB's 70.7% drawdown — a narrower gap to the peak suggests stronger recent price momentum.

MetricCGNX logoCGNXCognex CorporationKEYS logoKEYSKeysight Technolo…TRMB logoTRMBTrimble Inc.MKSI logoMKSIMKS Inc.
Beta (5Y)Sensitivity to S&P 5001.50x1.71x1.46x2.64x
52-Week HighHighest price in past year$71.90$367.12$87.50$326.83
52-Week LowLowest price in past year$27.82$146.23$61.63$71.49
% of 52W HighCurrent price vs 52-week peak+91.7%+96.6%+70.7%+92.0%
RSI (14)Momentum oscillator 0–10076.375.036.865.3
Avg Volume (50D)Average daily shares traded2.0M1.3M1.7M1.2M
Evenly matched — KEYS and TRMB each lead in 1 of 2 comparable metrics.

Analyst Outlook

CGNX leads this category, winning 2 of 2 comparable metrics.

Analyst consensus: CGNX as "Hold", KEYS as "Buy", TRMB as "Buy", MKSI as "Buy". Consensus price targets imply 53.6% upside for TRMB (target: $95) vs -18.5% for KEYS (target: $289). For income investors, CGNX offers the higher dividend yield at 0.49% vs MKSI's 0.29%.

MetricCGNX logoCGNXCognex CorporationKEYS logoKEYSKeysight Technolo…TRMB logoTRMBTrimble Inc.MKSI logoMKSIMKS Inc.
Analyst RatingConsensus buy/hold/sellHoldBuyBuyBuy
Price TargetConsensus 12-month target$60.22$289.25$95.00$272.86
# AnalystsCovering analysts31152829
Dividend YieldAnnual dividend ÷ price+0.5%+0.3%
Dividend StreakConsecutive years of raises40
Dividend / ShareAnnual DPS$0.32$0.87
Buyback YieldShare repurchases ÷ mkt cap+1.4%+0.6%+5.9%+0.2%
CGNX leads this category, winning 2 of 2 comparable metrics.
Key Takeaway

CGNX leads in 2 of 6 categories (Income & Cash Flow, Analyst Outlook). TRMB leads in 1 (Valuation Metrics). 2 tied.

Best OverallCognex Corporation (CGNX)Leads 2 of 6 categories
Loading custom metrics...

CGNX vs KEYS vs TRMB vs MKSI: Key Questions Answered

10 questions · data-driven answers · updated daily

01

Is CGNX or KEYS or TRMB or MKSI a better buy right now?

For growth investors, MKS Inc.

(MKSI) is the stronger pick with 9. 6% revenue growth year-over-year, versus -2. 6% for Trimble Inc. (TRMB). Trimble Inc. (TRMB) offers the better valuation at 35. 3x trailing P/E (20. 0x forward), making it the more compelling value choice. Analysts rate Keysight Technologies, Inc. (KEYS) a "Buy" — based on 15 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 — CGNX or KEYS or TRMB or MKSI?

On trailing P/E, Trimble Inc.

(TRMB) is the cheapest at 35. 3x versus Cognex Corporation at 96. 9x. On forward P/E, Trimble Inc. is actually cheaper at 20. 0x. The PEG ratio (P/E divided by earnings growth rate) is the most growth-adjusted single valuation metric: Keysight Technologies, Inc. wins at 4. 97x versus Trimble Inc. 's 8. 15x.

03

Which is the better long-term investment — CGNX or KEYS or TRMB or MKSI?

Over the past 5 years, Keysight Technologies, Inc.

(KEYS) delivered a total return of +147. 4%, compared to -22. 0% for Trimble Inc. (TRMB). Over 10 years, the gap is even starker: KEYS returned +1279% versus TRMB's +166. 8%. 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 — CGNX or KEYS or TRMB or MKSI?

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

(TRMB) is the lower-risk stock at 1. 46β versus MKS Inc. 's 2. 64β — meaning MKSI is approximately 80% more volatile than TRMB relative to the S&P 500. On balance sheet safety, Cognex Corporation (CGNX) carries a lower debt/equity ratio of 5% versus 173% for MKS Inc. — giving it more financial flexibility in a downturn.

05

Which is growing faster — CGNX or KEYS or TRMB or MKSI?

By revenue growth (latest reported year), MKS Inc.

(MKSI) is pulling ahead at 9. 6% versus -2. 6% for Trimble Inc. (TRMB). On earnings-per-share growth, the picture is similar: MKS Inc. grew EPS 55. 5% year-over-year, compared to -71. 3% for Trimble Inc.. Over a 3-year CAGR, MKSI leads at 3. 5% 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 — CGNX or KEYS or TRMB or MKSI?

Keysight Technologies, Inc.

(KEYS) is the more profitable company, earning 15. 7% net margin versus 7. 5% for MKS Inc. — meaning it keeps 15. 7% of every revenue dollar as bottom-line profit. Operating margin tells a similar story: KEYS leads at 17. 6% versus 14. 4% for MKSI. At the gross margin level — before operating expenses — TRMB leads at 68. 3%, 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 CGNX or KEYS or TRMB or MKSI more undervalued right now?

The PEG ratio (forward P/E divided by expected earnings growth rate) is the most precise measure of undervaluation relative to growth potential.

By this metric, Keysight Technologies, Inc. (KEYS) is the more undervalued stock at a PEG of 4. 97x versus Trimble Inc. 's 8. 15x. Both stocks trade at elevated growth-adjusted valuations, so expected growth needs to materialise. On forward earnings alone, Trimble Inc. (TRMB) trades at 20. 0x forward P/E versus 53. 0x for Cognex Corporation — 33. 0x cheaper on a one-year earnings basis. Analyst consensus price targets imply the most upside for TRMB: 53. 6% to $95. 00.

08

Which pays a better dividend — CGNX or KEYS or TRMB or MKSI?

In this comparison, CGNX (0.

5% yield), MKSI (0. 3% yield) pay a dividend. KEYS, TRMB do not pay a meaningful dividend and should not be held primarily for income.

09

Is CGNX or KEYS or TRMB or MKSI better for a retirement portfolio?

For long-horizon retirement investors, Keysight Technologies, Inc.

(KEYS) is the stronger choice — it scores higher on the combination of lower volatility, dividend reliability, and long-term compounding (+1279% 10Y return). MKS Inc. (MKSI) carries a higher beta of 2. 64 — meaning larger drawdowns in market downturns, which matters significantly when you cannot wait years for a recovery. Both have compounded well over 10 years (KEYS: +1279%, MKSI: +750. 6%), 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 CGNX and KEYS and TRMB and MKSI?

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

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 all of them.

Stocks Like

CGNX

High-Growth Compounder

  • Sector: Technology
  • Market Cap > $100B
  • Revenue Growth > 12%
  • Net Margin > 8%
Run This Screen
Stocks Like

KEYS

High-Growth Compounder

  • Sector: Technology
  • Market Cap > $100B
  • Revenue Growth > 11%
  • Net Margin > 10%
Run This Screen
Stocks Like

TRMB

Steady Growth Compounder

  • Sector: Technology
  • Market Cap > $100B
  • Revenue Growth > 5%
  • Net Margin > 7%
Run This Screen
Stocks Like

MKSI

High-Growth Disruptor

  • Sector: Technology
  • Market Cap > $100B
  • Revenue Growth > 7%
  • Net Margin > 5%
Run This Screen
Custom Screen

Beat Both

Find stocks that outperform CGNX and KEYS and TRMB and MKSI on the metrics below

Revenue Growth>
%
(CGNX: 24.3% · KEYS: 23.3%)
Net Margin>
%
(CGNX: 13.6% · KEYS: 16.9%)
P/E Ratio<
x
(CGNX: 96.9x · KEYS: 72.7x)

You Might Also Compare

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