Creating a solid, well-diversified stock portfolio can be much easier than people imagine. It doesn't take hours of research or investing in hundreds of individual companies -- it just takes a few broad exchange-traded funds (ETFs). If I had $20,000 to invest from scratch, here's how I would do it.

The must-have staple

If there was one must-have investment that everyone should have in their portfolio, it's an S&P 500 index fund. The S&P 500 is the most followed index on the stock market, tracking the largest 500 U.S. public companies by market cap. There's a reason Warren Buffett swears by the S&P 500: It works, historically returning around 10% annually over the long term.

There's very little difference between S&P 500 index funds, but the Vanguard S&P 500 ETF (VOO -0.07%) is a good go-to because of its low cost with a 0.03% expense ratio. Containing large-cap and blue chip stocks, this ETF is equipped to provide respectable long-term returns.

I would invest the bulk of the $20,000 in this ETF, dedicating $10,000 to it.

Cover your bases with different market caps

Small-cap stocks (those with a market cap between $250 million and $2 billion) can be a double-edged sword. On one end, their size makes them more susceptible to volatility and more vulnerable during market downturns. Conversely, their smaller size means they have more room for hypergrowth.

Mid-cap stocks are the sweet spot between small-cap and large-cap stocks. They're just large enough to have more financial resources to weather bad storms, yet small enough to still have room for lots of growth. You may not get the upside you would with small-cap stocks, but you also don't get as much risk. And you may not get the security of large-cap stocks, but there's usually more upside.

The Vanguard Small-Cap ETF (VB -0.10%) and Vanguard Mid-Cap ETF (VO 0.25%) are both great options, and I would invest $2,000 in each.

Look outside the U.S.

Every diversified stock portfolio should include international companies. You're limiting yourself as an investor if you only focus on American companies. There are many great companies worldwide, including many household names. International markets are generally divided into two categories, developed and emerging. But instead of focusing on them individually, you can look into a total international fund.

The iShares Core MSCI Total International Stock ETF (IXUS -0.17%) contains 4,309 stocks covering all major sectors and every continent (minus Antarctica). With a 0.07% expense ratio, it's also relatively low cost. A good rule of thumb is to aim to have around 20% of your portfolio in international stocks. I would dedicate $4,000 to a total international ETF.

Don't forget real estate

The logistical challenges that come with investing in physical real estate can turn a lot of people off. It can be too much for some people, whether it's dealing with contractors, tenants, or local regulations. Luckily, investors can still get their share of the real estate pie without going through those challenges. All thanks to real estate investment trusts (REITs).

A REIT is an investment company that buys real estate to produce consistent income (generally by charging rent). One of the best things about REITs is they are legally required to pay at least 90% of their taxable income back to shareholders in dividends.

If you're looking to kill two birds with one stone and receive diversification and exposure to real estate, look no further than the Vanguard Real Estate ETF (VNQ 0.19%). Within the ETF are 167 stocks and REITs covering many areas of real estate, including residential, hotel and resort, retail, office, industrial, and more. I would invest the remaining $2,000 here.

Breaking down the investments

Instead of investing the full $20,000 at once, I'd use dollar-cost averaging, which involves making regular investments at set intervals. Using dollar-cost averaging helps investors avoid trying to time the market because the investing schedule is already set. Whether stock prices are up, down, or stagnant, you make the investments.

You can break the investments down into two $10,000 investments, four $5,000 investments, ten $2,000 investments, or however you see fit. The key is to remain consistent and stick to your schedule.