A million dollars is a big amount, but if you have decades to go before retirement, it is within reach for most investors. The key is finding an investment approach and sticking to it through good markets and bad ones.

Three stocks currently out of favor (two that pay dividends and one that doesn't) to consider buying and holding and help you attain that $1 million investment goal are Toronto-Dominion Bank (TD -0.19%), landlord Realty Income (O 1.38%), and Berkshire Hathaway (BRK.A 0.06%) (BRK.B -0.04%). Here's a quick look at each.

1. Toronto-Dominion Bank: Real concerns but overblown risk

Toronto-Dominion Bank, or TD Bank as it is more commonly known, is one of the largest banks in Canada. That country's banking regulations are very strict, which has resulted in a small number of big banks (like TD Bank) that are effectively protected from new competition. This heavy-handed regulation has also created a conservative ethos within TD Bank and its peers. So, all in, it is a fairly safe bank.

That said, the housing market in Canada has been in a worrying state. First, there was a long rise in home prices, and now the quick rise in interest rates has investors worried that loan defaults will start ticking higher.

TD Bank has an added worry. It was recently forced by U.S. regulators to cancel an acquisition because of concerns over the company's money-laundering controls. Canada is the bank's foundation, and its U.S. business was expected to be its growth engine. That engine has just stalled, but it is likely only temporary.

As a result of these concerns, investors have pushed the bank's dividend yield up to 5%, which is toward its high end historically. Given that the bank has paid a dividend for over 100 years and has North America's third-highest tier 1 capital ratio, a measure of its ability to weather adversity, the risk here seems modest.

The growth opportunity in the U.S. market, meanwhile, is still quite large even if it takes longer to tap into. Wall Street's concerns seem like a buying opportunity.

2. Realty Income isn't exciting, but that's the point

Realty Income's 5.8% dividend yield is near its highest levels over the past decade. The investment-grade real estate investment trust (REIT) has increased its payout annually for 29 consecutive years.

That said, this is a slow and steady REIT, not a fast-growing one. But that makes it a good foundational investment on which to layer faster-growing dividend payers like TD Bank and non-payers like Berkshire Hathaway.

What's perhaps most compelling about Realty Income is its size, given that its $45 billion market cap is roughly three times larger than its next-closest peer among net lease REITs (net leases require tenants to pay most property-level operating costs).

Yes, rising interest rates have been a business headwind, but Realty Income has advantageous access to capital markets thanks to its scale and financial strength. That gives it the capacity to do deals that peers can't. It is also large enough to be an industry consolidator, having bought two net-lease peers in recent years.

If you reinvest dividends with this slow-growing, high-yield stock, it can provide a solid foundation (if a boring one) for a more diversified portfolio.

3. Berkshire Hathaway is an odd beast

Speaking of giant companies, conglomerate Berkshire Hathaway has its fingers in a vast array of businesses. It owns many, including a large insurance business, a railroad, and energy operations, and it invests in individual stocks, like Coca-Cola and Occidental Petroleum.

But it is probably best known for its CEO, Warren Buffett, whose ethos pervades the company and all of its investments.

What's interesting here is the success it has achieved over time, focusing on using the huge amount of cash its business generates to invest in other assets. Today Berkshire has a cash hoard of almost $34 billion and short-term investments of nearly $130 billion. All of that available cash is waiting to be deployed into new businesses when the time is right, since Buffett and Berkshire tend to favor investing in a contrarian fashion.

The story at Berkshire has been to buy low and hold on as long as possible. That has worked exceptionally well over the long term even if it has resulted in weak performance over shorter periods of time. Which is why Berkshire Hathaway is the kind of stock that you want to own for decades.

As for the right time to buy, it currently seems reasonably valued with a price-to-earnings ratio and price-to-sales ratio that are both near or below their five-year averages. A fair price is a good one for a company like Berkshire Hathaway.

A balanced mix of assets

Although any one of these stocks is worthwhile, TD Bank, Realty Income, and Berkshire Hathaway together create an interesting mix: a stock for income and growth, another for income alone, and a third for just growth that creates a diverse and balanced portfolio. The key, however, is to buy and hold for a very long time, letting the businesses you own continue growing. That's what will build your seven-figure nest egg.