.... this is almost always an incorrect assumption. No store is always lowest in price on everything. The surviving hardware stores today are members of dealer owned co-op distributors ... Do it Best, ACE, or True Value. All of the profits generated by the wholesale co-op distributors functions are rebated back to the dealer co-op member owners after the co-ops operating overhead has been paid. Some stores choose to use the rebate up front to lower prices, others use the rebate $ as a second year end profit to pay taxes and employee bonuses, etc.
Regardless, most hardware stores are usually within a few cents + / - on items under $20 and within a couple $ + / - on items over $20 compared to the boxes. I can walk through my store and point out several hundred items we are much lower in price and offer higher quality / better knowledge / service than the box.
The co-ops help assure us we are buying as good as the boxes on the same item / product number. The boxes arrange to buy an item that looks like the same item in a hardware store but the box version has cheaper differences .... ladders that aren't built as well, power tools that have shorter cords, thinner housings, etc, spray paint that have 10 OZ versus 12 or 14 OZ ... and on and on. When making an apples to apples comparison you need to compare the UPC bar code numbers .... just one digit difference within the same brand means it's different than the item sold to hardware stores vs the boxes. My co-op last year sold just under $3 BILLION of products to us approx 4,000 dealer owner - members.
Now compare the amount of your personal or company time and gasoline to attempt making the purchase and / or return for exchange / second / third trip to find what will solve your problem or complete the project going to a box versus the local store. We figured at wages of just $7.50 per hour, the box would need to save you a minimum of $17 to $25 just to break even on one trip taking 1 hour versus 15 to 20 minutes IF you know exactly what you need and where to locate it in the box. TPC = Total Procurement Cost ... what's rung up at the register is not the total cost of the item. If you are a person who could care less about your time use, gasoline, vehicle wear and tear, Shop the box first. Then go to your local hardware store.
At the bottom of every register sales receipt we have: "If you had started here first, you'd be done by now!"