Welcome to the wonderful world of Indexing. S&P announced Tuesday evening that Comerica was joining the S&P 500. Comerica officially joined the index when the stock market dosed on Thursday. By then its stock had risen $2.125, a nice 6 percent jump from its Tuesday dose. My 800 Comerica shares–the biggest single holding in my retirement ac-counts–were thus worth $1,700 more than they were two days earlier. In all, Comerica’s shares gained about a quarter billion dollars in market value.

Had Comerica’s prospects improved? Were its profits higher? Had some divine power alleviated the problems wracking Detroit, Comerica’s hometown and biggest single market? Nope. By all accounts, the two-day increase stems entirely from Comerica’s becoming part of the index. That forced index funds and other investors with portfolios tied to the S&P 500 to buy Comerica. All these new buyers–a total of 6.3 million shares changed hands Wednesday and Thursday, more than 15 times Comerica’s normal daily trading volume-levitated the stock. From now on, Comerica stock will be around $2 higher than it would be without the indexers. So I’m ahead even though I haven’t sold my shares.

I’m not telling you this tale to brag–it’s not as if I knew Comerica would go on the S&P 500. Rather, I want to discuss how Comerica- pronounced Koh-MEH-rikka –is a teeny-tiny example of how index investors can distort the prices of individual stocks. And how the S&P 500, the benchmark by which most professional investors judge their performance, is becoming distorted. Tons of money is pouring into index funds, index-linked certificates of deposit and all sorts of other stuff tied to the S&P 500. That money is invested automatically in some or all of the S&P 500 stocks, driving their prices higher than they would otherwise be. This bedevils market watchers who depend on the index to measure the overall market’s performance. Think of this distortion as the financial equivalent of physics’ Heisenberg Uncertainty Principle, which holds that the presence of an observer changes the event that’s being observed.

No one knows exactly how much is invested in accounts that mimic the S&P 500. But it’s big bucks, and growing rapidly. S&P estimates the number at $350 billion; some people think it could be $450 billion, or maybe even more. When a stock joins the S&P 500, index buying typically gives it a one-time boost of about 5 percent, according to S&P.

After the indexers finish buying in, of course, a stock will pretty much rise or fall based on how investors perceive its value. But hey, getting a one-time 6 percent boost, as we Comerica holders did, beats a sharp stick in the eye. “We encourage our employees to buy stock, and there are a lot of happy people walking the halls of Comerica Inc.,” said Michael Michalak, a first vice president in Comerica’s treasury department.

Mid-cappers: How many Comerica shares will indexers have to own? Good question. Jeffrey Rubin, a market analyst at Birinyi Associates, plugged various-Birinyi and S&P numbers into his computer and came up with an estimate of 9.3 million shares. (Don’t even ask what he did. If you don’t already know, you don’t want to find out.) Partly offsetting these buyers is–heaven help us–a second set of indexers, who are selling. These indexers have money in the S&P 400 Index, also known as the S&P Mid-Cap Index. The mid-cappers seem to own around 8 million Comerica shares. They have to sell because Comerica left the S&P 400 when it joined the S&P 500. Isn’t life fun? Assuming all of this is more or less right, indexers will end up with around 6 million more Comerica shares than they had before S&P announced Comerica was joining the 500. That would give indexers about an 8 percent stake in Comerica, up from the previous 2.5 percent or so. That helps prop up the stock price.

If it strikes you as somewhat silly that the indexing tail is wagging the stock-market dog, you’re not alone. It makes no sense that Comerica should be worth an extra quarter billion dollars just because it’s in the S&P 500. I’m not turning the money down, however. Even if Comerica’s stock falls, indexers have still given the stock a two-buck boost above where it would otherwise be.

The one-time $1,700 increase in the value of my Comerica shares isn’t going to make my retirement significantly more comfortable. But I’ll take free money anytime. As they say on Wall Street, it’s better to be lucky than good.