Tobacco company Altria is the company nearing an ex-dividend date that pays the biggest dividend yield. Investors that buy the stock before June 12 are entitled to a 4.6% dividend yield that's payable on July 10. An investor who puts $10,000 into the stock will be entitled to the quarterly dividend worth $460.
More from USA Today:
Reduced sentences urged for non-violent drug offenders
Friendly fire kills 5 U.S. troops in Afghanistan
Militants seize Iraqi city of Mosul
Investors who buy before the ex-dividend date can count on the next dividend payment, but there's still risk. Typically, all things held equal, the price of the stock falls on the ex-dividend date by the amount of the dividend. That means while investors can count on the dividend cash coming their way, the value of the stock falls by the amount of the dividend.
And lastly, while there's no reason to expect that these companies wouldn't pay the dividends they declared, nothing's for sure until it's in your hand.
Below are the S&P 500 companies paying dividend yields of 3% or higher with ex-dividend dates through July and expected to boost dividends by 3% or more over the next three years:
Read More These 3 states house the 'ugliest' S&P stocks