Winona-based Fastenal, a distributor of industrial and construction supplies, was able to keep ahead of rising costs, posting solid earnings Wednesday for the spring quarter.

Fastenal's quarterly results are considered a bellwether for industrial and manufacturing companies. It is among the first companies to report their results every three-month cycle.

The company earned $287.1 million, or 50 cents a share, up 20% from the second quarter last year. Sales grew 18% to $1.78 billion.

Fastenal didn't make broad price increases in the second quarter, but the company benefited from price actions taken over the last 12 months that helped to offset rising costs, particularly on its fasteners, metals, plastics and transportation. The company also kept open the prospect it would raise prices again in the second half of 2022.

Results largely met analyst expectations. Collectively, the analysts covering Fastenal expected earnings of 50 cents a share for the quarter, up from 42 cents in the same quarter last year. They expected revenue to grow more than 18% to $1.785 billion.

Growth in the industrial economy is a key to Fastenal's long-term growth initiatives including adding more onsite locations, which are Fastenal sales and services locations located within or close to a customer's facility. The company also plans to add more of its industrial vending machines.

Fastenal signed 102 new onsite locations in the second quarter and now has 208 locations signed for the year.

"This is the first time we've ever signed 100-plus [onsite locations] in two consecutive quarters," Dan Florness, Fastenal's chief executive, said in a call with analysts. "In an era where it's more difficult to hire and more difficult to manage supply chain, I believe our onsite model is even a better option for our customer in the marketplace."

As of June 30, the company had 1,501 active sites — 13.5% more than at the end of the second quarter last year.

Revenue that came through Fastenal's vending and connected bin and stocking locations, which the company collectively refers to as FMI Technology, increased 37% to $640.6 in the second quarter as signings for installations increased 10.6% during the period.

But Florness told analysts there were some signs of slowing demand. The company didn't end June as strong as it started the month and has adjusted downward the number of FMI Technology signings for the rest of the year, which includes vending and sensor-managed bin devices.

Shares of Fastenal closed Wednesday at $46.77, down 6.4%. It was the sharpest loss, by percentage, in the S&P 500 index Wednesday. Over the last 52 weeks, Fastenal has traded between $46.29 and $64.75 a share.