The S&P 500 index, a popular benchmark used to measure U.S. large-cap stocks, has risen 12.7% over the last year through Oct. 10.

While that measures a group of stocks, certain individual ones have done better than others in this capitalization-weighted index. For instance, technology investors have no doubt been pleased with the S&P 500 Information Technology index's 22.9% gain during this time.

However, that leaves room to examine stocks that have underperformed the overall market. In fact, Coca-Cola (KO -0.43%) and ConocoPhillips (COP 1.30%) have lost 3.6% and 20.7% respectively over the last year.

For dividend-seeking investors seeking to hold stocks for a very long time, these two companies belong in your portfolio.

Someone putting cash into their suit jacket pocket.

Image source: Getty Images.

1. Coca-Cola

Coca-Cola has been in existence since 1886, and currently sells its beverages in more than 200 countries. Its products include soda, water, juice, and value-added dairy. Aside from its Coke brand, it also sells its goods under well-known brands like Fanta and Sprite.

Coca-Cola produced second-quarter adjusted revenue growth of 5%, adjusted to exclude foreign-currency translations and the effects of acquisitions and divestitures. Stripping these out gives investors a way to compare operational results. The higher revenue helped drive adjusted operating income 15% higher.

Higher prices and a changing product mix contributed 6 percentage points. I would like to see higher volume, which subtracted 1 percentage point from revenue growth.

However, weaker volumes should prove temporary. Consumers undoubtedly feel weary from high overall inflation. When that returns to more normal levels, I expect volumes to increase. In the meantime, Coca-Cola's market share in the nonalcoholic beverage sector continued to expand, a very positive development during challenging economic times.

The shares trade at a more attractive valuation, based on the trailing price-to-earnings (P/E) ratio.

Coca-Cola has shown how dividends remain a top priority. Shareholders have seen regular annual increases, including a more than 5% hike in February. That ran the company's streak to 63 straight years, making it a Dividend King.

The shares have a 3% dividend yield, more than double the S&P 500's 1.2%. Coca-Cola, with a 71% payout ratio, can easily afford the payments.

2. ConocoPhillips

ConocoPhillips (COP 1.30%) explores and produces oil and natural gas around the globe. This includes North America, Europe, Africa, and Asia.

That means it has cyclical results, depending on the price of natural resources. Crude oil prices, based on West Texas Intermediate, are under $60 a barrel compared to nearly $80 in January.

While production increased, ConocoPhillips realized lower prices. Its adjusted earnings per share dropped 28% to $1.42.

Given its size and properties, earnings should rebound when prices recover. In the meantime, despite a lower bottom line, ConocoPhillips produces enough free cash flow (FCF) to cover dividends. During the first half of the year, it generated FCF of $2.9 billion compared to dividend payments of $2.7 billion.

The stock's P/E ratio has dropped from 13 to 12 over the last year. That seems likely due to short-term concerns about energy prices.

While waiting for commodity prices to recover, you can collect the stock's above-market yield of 3.6%. Patient investors can rely on dividends while waiting for the stock to recover. Over time, you should have an attractive total return.