Can You Invest in the S&P 500 but Leave Out Some Companies?

The S&P 500 is one of the most popular indexes around, but that doesn’t mean every stock it holds makes sense for your portfolio. If you want to leave some out, you have options.

Many, or all, of the products featured on this page are from our advertising partners who compensate us when you take certain actions on our website or click to take an action on their website. However, this does not influence our evaluations. Our opinions are our own. Here is a list of our partners and here's how we make money.


The investing information provided on this page is for educational purposes only. NerdWallet, Inc. does not offer advisory or brokerage services, nor does it recommend or advise investors to buy or sell particular stocks, securities or other investments.

Updated · 4 min read
Profile photo of Bella Avila
Written by 
Editor & Content Strategist
Profile photo of Sabrina Parys
Edited by 
Editor & Content Strategist

Investing in the S&P 500 index is appealing to many people just starting out. It has a track record of strong long-term returns, offers instant diversification and has a low barrier to entry: You simply set up a brokerage account, pick an index fund or ETF that tracks the index, and let compounding returns do their magic.

But what if there are companies in the S&P 500 you'd rather not invest in, whether for ethical reasons or because you're already invested in that company elsewhere? A technique known as direct indexing gives you a workaround, and it has some additional advantages, too.

Three reasons investors choose direct indexing


Avoiding overexposure

Direct indexing is an investment strategy that allows you to buy the individual stocks that make up an index, rather than investing in an index fund or ETF. Since it gives you the freedom to customize an index, it can help you avoid overexposing yourself to any one stock.

Mark McCarron, partner and chief investment officer at Wescott Financial Advisory Group, gives the example of a senior executive who already receives company stock and doesn’t want to hold more of it through an index like the S&P 500. “They can invest in a direct index and exclude that company and replace it with something that’s consistent with it but not the same,” he says.

Avoiding companies for moral or religious reasons

Another reason you may choose direct indexing is to exclude companies you don't align with. The S&P 500 is a fairly large set of companies, which is great for diversification — but a bigger index means there’s a higher chance it will include companies that may not match your values.

If you want to avoid certain sectors due to religious or moral beliefs, “you're able to better customize the portfolio using direct indexing to match exactly what it is that you want,” says Kris Kellinghaus, chief investment officer and managing partner at MCF Advisors.

Tax benefits

One of the most popular reasons people choose direct indexing is to take advantage of a strategy known as tax-loss harvesting. This is when investors strategically sell certain stocks for tax benefits, says McCarron, which is harder to pull off with a traditional index fund.

Brokerage firms

An emerging reason for direct indexing: Mega-cap IPOs


Direct indexing has also made its way into mainstream conversation for a different reason: tech giant IPOs.

SpaceX, the space and technology company owned by Elon Musk, is expected to go public in June. The company is aiming for a valuation of $1.75 trillion, which would make it the largest IPO in history.

In response, some stock market indexes are looking to loosen the criteria a company must meet to be included. The S&P 500, for example, wants to ease rules around profitability and time on market for mega-cap companies

The S&P defines a mega-cap company as one with a market capitalization that's equal to or greater than the 100th largest company in the S&P Total Market Index.
. The argument for these change is that failing to track big companies like SpaceX early on makes for an inaccurate reflection of the market for passive investors.

If the proposals go through, SpaceX may be the first company to be fast-tracked into the index under the new rules, but it likely won’t be the only one. Anthropic, the $900 billion company that created the AI bot Claude, filed for an IPO on June 1. OpenAI, the $730 billion company that created ChatGPT, may follow in Anthropic’s footsteps later this year.

What does this mean for passive investors who aren’t thrilled about having companies that are brand-new to the market added to their portfolios? Perhaps a shift toward direct indexing to gain more control over holdings in their portfolios, but the tax implications of moving money from one investment account to another may outweigh the benefits for some investors.

» Need expert help deciding on a strategy? See our list of the best financial advisors

Is direct indexing the right method for you?


Direct indexing is one way to invest in the S&P 500 while excluding certain companies, but it isn’t a simple task. Trying to replicate an index like the S&P 500 on your own requires continuous, time-consuming research and rebalancing — an undertaking not everyone can afford or keep up with.

More online brokers are beginning to offer direct indexing portfolios, but many require steep minimums. For example, Charles Schwab’s Personalized Indexing portfolio requires a $100,000 minimum balance, as does Wealthfront’s direct indexing option. Public's new direct indexing feature has a slightly lower (but still high) minimum of about $80,000 for direct indexing into the S&P 500.

Some brokers offer a more cost-effective version of direct indexing, like Fidelity’s $5,000-minimum FidFolios, but experts note that bigger portfolios generally see the largest benefits of direct indexing.

One common way to direct index is to outsource the portfolio management to an investment manager. As with online brokers, minimums tend to run high — but McCarron says they aren’t as expensive as they once were.

“Many, many years ago, it was millions of dollars to get access to this capability. Now it’s maybe $250,000 to open an account, and I’ve seen that further fall to $100,000 to $50,000,” he says.

Alternatives to consider


If the price tag on direct indexing doesn’t sound so great, or perhaps it’s a more complex process than you’re ready to dive into, there are other investment strategies to look into that will give you diversification while still letting you exclude certain companies.

If you want to prevent overexposure or avoid fast-tracked mega-caps: You may look into whether there’s a different index fund you could invest in that doesn’t include the company but offers similar diversification. This stock exposure tool from ETFDB may be a good place to start. Just input the company you want to avoid, and it will show you all the ETFs that contain that stock.

If you want to invest based on your values: Aligning your investments with your values is becoming more accessible through standard brokerage accounts. There are many index funds and ETFs out there that adhere to environmental, social and governance standards (you may know this as ESG investing). Many robo-advisors also offer pre-set ethical portfolio options to pick from. These may be a good fit if you want to put your money toward companies you believe are making a positive impact instead of dodging companies you don’t like in a broad index fund.

If you want tax optimization: While direct indexing may be a good option for tax optimization, many robo-advisors offer tax-loss harvesting services in their accounts, often at no additional cost.

Frequently asked questions


Can you exclude some companies from your 401(k)?

Usually no. Most 401(k)s offer pre-selected investment options that you don’t have much control over. Some plans allow you to pick your own investments through a self-directed brokerage account, but this requires a lot of research and upkeep that might not be suitable for most people.