You may have read about institutions such as Berkshire Hathaway making large investments in stocks. But individual investors shouldn't get put off by these billion-dollar headlines.

You don't need a lot of money to invest in stocks. The key is to get started, and you can add to your position over time.

First, you need to find stocks worthy of holding for a long time. These two should continue to perform well. Let's learn why.

An investor sitting in front of a phone and laptop viewing stock charts.

Image source: Getty Images.

1. Home Depot

Home Depot (HD 0.94%) has an enviable market position in the home improvement retail industry. It's the largest company based on sales.

During the first nine months of the fiscal year, which ended on Oct. 29, 2023, it generated sales of about $118 billion, dwarfing major competitor Lowe's (NYSE: LOW) $68 billion. This size conveys certain competitive advantages, such as an ability to offer products and services to do-it-yourself customers and professional contractors at more attractive prices.

With people's spending pressured by economic factors such as elevated prices on essentials, Home Depot's customers spent more on smaller projects than major ones. Its same-store sales fell by 3.1% in the fiscal third quarter.

But Home Depot, which has been around since the late 1970s, has managed through many challenging and even turbulent times. While its near-term results may fluctuate, long-term shareholders should take solace in management's ability to survive and thrive.

It generates plenty of free cash flow (FCF), which it uses to reward shareholders. For the first nine months of the year, Home Depot's FCF was $14.1 billion, and it spent $12.8 billion on share repurchases and dividends. The board of directors has raised dividends for many years, and the stock has a 2.4% dividend yield, higher than the S&P 500's average yield of 1.5%.

Management has a proven ability to generate strong returns for shareholders. Home Depot's return on invested capital fell from 43.3% last year to a still-attractive 38.7%. That financial stability should help patient investors wait out a cyclical downturn.

2. Costco

Costco Wholesale (COST 1.01%) has a simple business that it has executed to near perfection over the years. It offers a wide range of high-quality goods and services to members at low unit prices, often by providing items in bulk.

Operating membership-only warehouses for an annual fee, it has had no problem retaining and attracting new members. Renewal rates have consistently hovered around 90%, and it was 90.5% worldwide in the most recent fiscal quarter, which ended on Nov. 26. Paid members totaled 72 million compared to 67 million a year ago.

Focusing on providing value to customers, Costco also operates a profitable business. In the first quarter, operating income increased by 13.3% to $2 billion. Management has also held off on raising membership fees to prevent stressing customers. It will eventually do so at some point in the future, and that'll boost revenue and profits.

These profits translate into healthy FCF generation. Last year's FCF was $6.7 billion, and the company paid $1.3 billion in dividends. Costco has increased dividends annually since its initial payment in 2004. While the stock's 0.6% dividend yield isn't the most exciting, it's also in the habit of declaring large, special payouts every few years, including a recent payment of $15 per share.

Home Depot and Costco both have served their respective customers very well and established strong market positions. That's why both continue to have strong long-term return potential. Those who start with modest sums, adding to their initial investment over time via dollar-cost averaging, can invest in these two stocks and watch their modest investment grow into a tidy sum.