Five hundred dollars won't get you very far if you're looking for diversification on the stock market. Shares of many successful companies (such as Microsoft) are trading for about that price all on their own.

Yet, your investing dollars can stretch much further when you are shopping for exchange-traded funds (ETFs). These funds allow you to purchase a basket of stocks in one simple transaction, giving you an efficient (and cheap) way to gain exposure to a sector, an investing style, or even the entire market.

But which funds should you buy?

With indexes trading near all-time highs, it can make sense to try to balance your investments by purchasing parts of the market that haven't rallied as much. In this case, that includes many stocks outside of the large-cap tech giants that have powered recent stock market gains. Let's take a closer look at two popular ETFs that cover your bases well in this arena.

1. Vanguard Mid-Cap ETF

The Vanguard Mid-Cap ETF (VO 0.72%) is an index fund that passively tracks the performance of medium-size companies (with market capitalizations of between around $2 billion and $10 billion). That focus means there's no danger of adding excess exposure to the handful of giant stocks that have driven most of the market's returns in recent months. Apple and Microsoft, valued at $2.6 trillion and $3 trillion, respectively, won't be found in this ETF.

Yet, you will get exposure to over 300 mid-cap stocks across all market sectors. The ETF tilts toward value as well, with the average price-to-earnings (P/E) ratio of its portfolio landing at 21 compared to the S&P 500's P/E multiple of 24. Some of its biggest holdings include tech specialist Motorola, work uniform maker Cintas, and Palantir Technologies, which focuses on artificial intelligence.

This ETF charges investors rock-bottom fees of 0.04%, or $4 per $1,000 invested in the ETF. That's compared to peers that charge upward of $91 per $1,000 invested.

2. iShares Morningstar Small-Cap Value ETF

Small-cap stocks, especially those on the value end of the spectrum, have been left out of the market rally in recent months. That creates a potentially strong buying opportunity for the iShares Morningstar Small-Cap Value ETF (ISCV 0.78%). This fund focuses on small-cap companies (those with market caps of around $250 million to $2 billion). The other key requirement is that the stock is considered undervalued compared to its peers.

Investing in this pool with individual stocks is very risky as these stocks tend to be highly volatile. Consider owning this ETF instead for instant exposure to over 1,000 small-cap stocks. Some of its top holdings include luxury homebuilder Toll Brothers and sports retailer Dicks Sporting Goods. This fund charges a very low fee of 0.06% in management expenses.

It isn't for everyone, to be sure. It doesn't tend to closely track the wider market, which in the last year has translated into significant underperformance relative to the S&P 500. However, it might perform better during flat or declining markets due to its focus on companies with more reasonable stock valuations.

In any case, consider putting both of these ETFs into your portfolio to gain exposure to more companies that aren't members of the "Magnificent Seven." That way your portfolio can be more stable during volatile times in the stock market.