The Labor Department says the producer price index, which measures the cost of goods and services before they reach the consumer, rose 0.4 percent last month. The increase follows a 0.2 percent decrease in May.
Gas costs rose 6.4 percent in June. Steel prices shot up 3 percent. But prices fell for grains, cheese and rental cars.
In the past 12 months, producer prices have risen 1.9 percent, roughly in line with the Federal Reserve's inflation target of 2 percent.
Retailer and wholesaler profit margins increased 0.2 percent. Excluding the volatile food, energy and profit margin categories, core producer prices were up 0.2 percent in June.