Key PointsSince 1980, the S&P 500 has logged a negative total return in eight calendar years.Coca-Cola’s total return beat the index in seven of these years, but it still lost money in three of them.Shares trade at around 26 times earnings after climbing about 23% so far this year.Since 1980, the S&P 500(SNPINDEX:^GSPC) has lost money in eight calendar years, even counting dividends. These years were 1981 and 1990, the three years from 2000 to 2002, and then 2008, 2018, and 2022.In seven of those eight years, Coca-Cola(NYSE:KO) posted a higher total return (the change in the stock price plus dividends) than the index. And in five of them, the drinks giant’s shareholders made money even though the market dropped.Missed Nvidia in 2009? This Rare Signal Is Flashing Again.In 2009, a “Double Down” signal flashed for a little-known chipmaker called Nvidia. For the first time in years, that same “Total Conviction” signal is flashing for a company 1/100th the size of Nvidia. Continue »Averaged over all eight years, Coca-Cola’s total return was around 1% a year, while the index averaged a loss of about 14%.In other words, across the market’s bad years, Coca-Cola’s shareholders have ended up about even on average.But the stock isn’t cheap going into whatever the next bad year is. As of this writing, shares trade near $86 — up about 23% this year and within about 6% of the all-time closing high they hit in late August. That comes to about 26 times earnings.Seven out of eightI think the five positive years are the most impressive part of the record. Coca-Cola’s total return was around 11% in 1981, when the S&P 500 dropped about 5%, and about 23% in 1990, when the index lost 3%. In 2000, it returned 6% as the index fell 9%. More recently, the shares returned around 7% in 2018, a year the S&P 500 dropped 4%, and about 11% in 2022, when the index lost 18%.This record probably comes from the business itself. People can cut back on a lot when money gets tight. A soda or a bottle of water is a small purchase, and demand for Coca-Cola’s drinks tends to hold up better than demand for a car or a vacation.The business looks healthy today, too. In the second quarter of 2026, Coca-Cola lifted its non-GAAP (adjusted) earnings per share 11% over the year-ago period. That followed 18% growth in the first quarter, a period boosted by six extra days. And it was a big jump from the 4% growth the company reported in the second quarter of 2025.What’s more, management raised its full-year outlook for adjusted earnings-per-share growth to 9% to 10%, up from 8% to 9%. That faster earnings growth arguably explains a good part of this year’s rally.Three losing yearsStill, beating the market isn’t the same as avoiding losses. Coca-Cola’s shareholders lost money in 2001, 2002, and 2008.Coca-Cola lagged the index only in 2001. Its total return was a loss of around 21%, compared to the S&P 500’s 12% fall.In 2002, its total return was a loss of 5.5%, far better than the index’s 22% drop.AdvertisementIn 2008, Coca-Cola’s total return was a loss of around 24%. The S&P 500 dropped 37%, so Coca-Cola held up much better. But an investor who owned it through the financial crisis still gave up almost a quarter of their money over 12 months.Notably, Coca-Cola headed into 2008 at around 24 times its 2007 earnings, near the stock’s valuation now.Is Coca-Cola stock worth 26 times earnings?Coca-Cola’s worst run came after investors paid a really high price for the stock. At the end of 1998, Coca-Cola stock traded at around 47 times earnings, and its earnings per share had fallen 13% that year.Over the next four years, Coca-Cola’s total return was a loss of about 30%, worse than the S&P 500’s loss of about 24% over the same span. The damage came in 1999, when Coca-Cola’s total return was a loss of 12% but the index gained 21%, and in 2001. In fact, the stock price didn’t end a month above its 1998 high until late 2014.Today’s valuation is far from that extreme. The stock’s price-to-earnings ratio is around 26 today, and it falls to about 24 based on the earnings expected for 2027. And earnings are rising now, instead of shrinking like they were in 1998.Yes, the record suggests Coca-Cola might hold up better than the index if the market hits a tough patch. But after a 23% climb this year, much of that steadiness already seems to be built into the price. As 2008 showed, holding up better can still mean losing lots of money.In the end, I think Coca-Cola is a sensible stock to keep through a bad market. For new money, though, I’d want a lower price than this.Should you buy stock in Coca-Cola right now?Before you buy stock in Coca-Cola, consider this:The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Coca-Cola wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.Consider when Netflix made this list on December 17, 2004… if you invested $1,000 at the time of our recommendation, you’d have $361,650!* Or when Nvidia made this list on April 15, 2005… if you invested $1,000 at the time of our recommendation, you’d have $1,437,517!*Now, it’s worth noting Stock Advisor’s total average return is 936% — a market-crushing outperformance compared to 211% for the S&P 500. Don’t miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.See the 10 stocks »*Stock Advisor returns as of October 3, 2026. Daniel Sparks and his clients do not have positions in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.