As production at factories and construction sites has picked up to levels not seen in years, the need for supplies from Fastenal has increased, producing a third quarter with double-digit sales increases.

Still, its stock was trading down more than 5 percent in midday trading because it also said its profit margins had thinned some because of higher freight costs and greater employee costs.

The Winona-based wholesale distributor of industrial and construction supplies said third-quarter earnings increased 38 percent to $197.6 million, or 69 cents per share, and sales rose 13 percent to $1.28 billion over the same period last year.

Sales and earnings both came in above the consensus analyst expectations for the quarter. Analysts polled by Thomson Reuters were expecting earning per share of 67 cents on sales of $1.27 billion.

Much of the earnings gain came from benefits of tax reform. Still, taking the changes out of the equation, profits still increased 15 percent.

Most of the revenue growth came from higher unit sales because of the strong economy, but the company also saw growth because of the continued increase in Fastenal's Onsite sales centers and industrial vending machines, which both are located at or adjacent to customers' facilities.

Fastenal as of Sept. 30 has 828 active Onsite locations, an increase of 49.2 percent from 2017. The company now has 78,706 vending machines, up 14 percent over the same time last year.

CEO Dan Florness told analysts on the company's earnings conference call that growth of the Onsite business last quarter was faster than within the company's traditional branch network.

Sales growth from the Onsite business, excluding transferred branch sales, was about 20 percent compared with the 13 percent revenue growth overall in the quarter.

A concern for Fastenal in the third quarter was increased gross-margin pressure. Fastenal's gross margin was 48.1 percent in the third quarter, down from 49.1 percent in the third quarter of 2017.

"We believe the company will continue to work on offsetting some of the pressures by increasing the prices it charges customers and improving operational efficiencies," wrote Jeff Windau, an analyst for Edward Jones, in a research note Wednesday.

Florness told analysts that in September the company was able to gain some price increases that have offset inflation pressures. "We exited the quarter at a much better position than we entered the quarter or in what the quarter experienced," Florness said.

However, he also said pressure from tariffs could pose challenges.

The first round of tariffs by President Donald Trump's administration had limited impact on Fastenal. The round announced in September, though, is directly impacting the North American supply chain and Fastenal's business, Florness said.

The company for months, he said, has been evaluating every aspect of its materials sourcing.

"In an environment where there's political variability as opposed to economic variability, it makes it very challenging to plan," Florness said. "The biggest thing is having good open dialogue with your customer, but also understanding that for a lot of our customers … what we sell is a relatively small part of their spend. So it's creating the least amount of disruption into their supply chain."

Shares of Fastenal closed Wednesday at $51.67, down 7 percent. However, it was a down day for the broader markets as well. Fastenal's shares have traded between $42.51 and $61.14 per share over the last 52 weeks.