If you drive a gas guzzler, as millions of Americans do, and also happen to have an investment in an S&P 500 index fund, as millions of Americans do, you’re about to find yourself having serious money tied up in a company that’s trying to run your vehicle off the road.

How can this be? Because in less than two weeks, the electric car company Tesla is going to be added to the S&P 500.

And when that happens, people who are invested in mutual funds or exchange traded funds indexed to the S&P will have Tesla as one of their funds’ biggest holdings.

Judging by numbers from the mutual fund mavens at Morningstar and the index fund mavens at Vanguard, I estimate that at Tuesday’s prices, retail investors’ S&P 500 index funds would have more than $18 billion of their money invested in Tesla, up from zero.

Let me show you where this number comes from.

Morningstar told me that retail S&P index funds and ETFs had a total of just over $1.25 trillion of assets at the end of November. Vanguard told me that if Tesla had been added to its S&P index fund after Friday’s market close, it would have been 1.435 percent of the fund.

Apply Vanguard’s percentage of 1.435 percent to the $1.25 trillion Morningstar number (1.25 trillion times 0.01435) and you end up with retail S&P index funds owning a bit over $17.9 billion of Tesla.

Then tweak everything for the S&P’s 2.2 percent rise this month through Tuesday and — voilà! — you’re over $18 billion.

My biggest single investment stake is in S&P 500 index funds — and the prospect of having so much of my money invested in a bizarre stock like Tesla, with its wild ups and downs, doesn’t thrill me. It may not thrill you, either. But such is life.

Tesla, which has finally managed to show something resembling a profit and thus become eligible to join the S&P, has almost octupled in price this year. Yes, octupled. It was up 677 percent through Tuesday.

The prospect of big-time buying by index fund managers is clearly a major factor — if not the major factor — in the company’s soaring stock price. Tesla co-founder and chief executive Elon Musk is astutely taking advantage of the price run-up to raise capital — Tesla announced Tuesday that it was going to sell up to $5 billion of new shares to investors.

A higher share price lets Tesla raise the money by selling far fewer shares than it would have taken before news of its inclusion in the S&P. That will make its post-sale stock price higher than it otherwise would have been — something that really matters to Musk, whose net worth and compensation depend almost entirely on the price of Tesla’s stock.

As of Oct. 30, which was before the S&P announcement, Tesla was the 14th-biggest stock in Vanguard’s total stock market index fund. Now it’s No. 7. And it also would be the seventh biggest stock in the S&P, behind only Apple, Amazon, Microsoft, Facebook and the two share classes of Alphabet, Google’s parent company.

Given its shockingly rapid price rise — through Tuesday, Tesla was up 67 percent since the start of November, five times as much as the S&P — who knows what its weight will be when it joins the index on Dec. 21.

It’s also not clear how much of Tesla’s stock price increase comes from anticipation of index funds having to buy a major Tesla stake, and how much (if any) has to do with Tesla’s assets, profits and prospects.

Since that announcement, Tesla stock has risen to $649.88 from $408.09 — almost 60 percent, compared with the S&P’s rise of 2.2 percent.

Howard Silverblatt, senior industry analyst for S&P Dow Jones Indices, told me that at Tuesday’s price, S&P index funds would have to buy $84.7 billion of Tesla stock — that’s about 130 million shares — to reflect its weight in the index. That’s up from his estimate of $51 billion on Nov. 16, the day S&P announced it was adding Tesla to the 500.

The final word: If you own both a gas guzzler and S&P 500 index funds, you’re in an interesting place. If Tesla’s stock continues rising rapidly after it joins the S&P, it may generate enough profit to help cover your gas bills. And even if Tesla tanks after joining the S&P, you’ll still have gotten a really interesting ride.