Energy prices up 41% over past 12 months

June's red-hot inflation was largely driven by high oil and gasoline prices. The Consumer Price Index (CPI) shows energy rose 7.5% on a month-over-month basis, contributing to almost half of the all items increase in June. Energy is up 41.6% over the past 12 months.

Gasoline rose 11.2 % on a month-over-month basis. The gasoline index rose 59.9% on an annual basis, the largest 12-month increase in that index since March 1980.

Retail gasoline rose to all time highs on June 14, according to AAA. Prices at the pump have been declining since. But the small relief didn't impact the inflation rise of 9.1%, the biggest spike since 1981.

Natural gas rose 8.2% in June, the largest monthly increase since October 2005. Electricity rose 1.7%.

Food and shelter were also big contributors to the inflation print. Consumers have been squeezed by higher food and gas costs, leaving less room for discretionary items.

Year-to-date, Consumer Discretionary stocks are down the most out of the major sectors. On Wednesday the markets opened lower anticipating the Federal Reserve will continue on its path towards higher rates in order to combat inflation.

Ines is a stock market reporter for Yahoo Finance. Follow her on Twitter at @ines_ferre

Click here for the latest economic news and economic indicators to help you in your investing decisions

Read the latest financial and business news from Yahoo Finance

Download the Yahoo Finance app for Apple or Android

Follow Yahoo Finance on Twitter, Facebook, Instagram, Flipboard, LinkedIn, and YouTube