Home Depot (HD -0.65%) and Sherwin-Williams (SHW -0.89%) can help you improve the value of your home. But they may be even better at helping you to increase the value of your stock portfolio.

With their shares surging 200% and 158%, respectively, over the past five years, Home Depot and Sherwin-William have created fortunes for their investors. But which of these home-improvement titans is the stronger investment opportunity today? Let's find out.

New hardwood flooring and paint supplies

Image source: Getty Images.

Financial strength

Home Depot and Sherwin-Williams are both excellent businesses. But let's take a look at how they stack up in regard to some key financial metrics.

Metric

Home Depot

Sherwin-Williams

Revenue

$99.23 billion

$13.79 billion

Operating income

$14.42 billion

$1.75 billion

Net income

$8.60 billion

$1.08 billion

Operating cash flow

$11.61 billion

$1.60 billion

Free cash flow

$9.78 billion

$1.39 billion

Cash

$3.55 billion

$0.21 billion

Debt

$25.59 billion

$10.95 billion

Data source: Morningstar.

With $3 billion more cash in its coffers, Home Depot has a far stronger balance sheet than Sherwin-Williams. It also generates 8 times the operating profits and 10 times the operating cash flow. This gives Home Depot the edge in terms of financial fortitude.

Advantage: Home Depot.

Growth 

Sherwin-Williams' revenue growth -- fueled by its blockbuster acquisition of rival Valspar -- has exceeded that of Home Depot in recent years. The paint king has also enjoyed larger increases in operating and free cash flow production.

SHW Revenue (TTM) Chart

SHW Revenue (TTM) data by YCharts

Analysts expect Sherwin-Williams' earnings per share to rise by more than 18% annually over the next half-decade, as it works to fully integrate Valspar into its operations. During this same time, Home Depot's EPS is projected to rise by about 15%  annually, driven by its omnichannel and margin expansion initiatives.

With its recent past -- and, more importantly, expected future -- growth exceeding that of its larger rival, Sherwin-Williams has the edge here.

Advantage: Sherwin-Williams.

Valuation

No better-buy discussion should take place without a look at valuation. Let's check out some key value metrics for Home Depot and Sherwin-Williams, including price-to-earnings (P/E) and price-to-earnings-to-growth (PEG) ratios.

Metric

Home Depot

Sherwin-Williams

Trailing P/E

28.14

22.31

Forward P/E

22.47

19.19

PEG

1.84

1.22

Data source: Yahoo! Finance.

On all three metrics, Sherwin-Williams' stock is considerably less expensive than Home Depot's. This is particularly true when we factor in Sherwin-Williams' higher expected earnings growth rate; its PEG ratio is more than 33% lower than that of Home Depot. Thus, the paint king's shares are the better bargain.

Advantage: Sherwin-Williams.

The better buy is...

Home Depot is a cash-generating machine, but with its superior growth prospects and more attractively priced stock, Sherwin-Williams is the better buy today.