The Consumer Price Index, or CPI, increased a seasonally adjusted 0.3% for June, driven largely by more expensive gasoline, according to a Labor Department report (link opens as PDF) released Tuesday. 

After increasing 0.4% for May, analysts' expectations for June's top line increase proved spot on. 

Source: Labor Department 

According to the report, it was gasoline's 3.3% month-to-month price rise that was responsible for approximately two-thirds of June's index increase. Food costs edged up just 0.1%, the smallest gain since January. The 3.3% jump in gasoline costs was not expected to be repeated in July given that pump prices have been falling in recent weeks. Food costs have been rising sharply this year, reflecting a variety of factors from cold weather hurting winter crops in such states as Florida and a severe drought in California.

Excluding more volatile food and energy prices, the CPI registered a smaller 0.1% rise, 0.1 points below expectations and a dip from May's 0.3% increase. 

Investors keep an eye on the CPI to better understand the inflation rate. If prices head higher, then Americans are incentivized to spend more money today while it buys more, boosting economic growth.

Despite June's relatively lackluster rise, year-over-year increases are still in line to hit the magic 2%, a rate that economists believe to indicate a healthy inflation balance. The overall CPI is up 2.1% in the last 12 months. Excluding food and energy prices, the same index is up 1.9%.

-- Material from The Associated Press was used in this report.