You ll want a leg on each end  and then middle legs depending on your span   2x4s can span about 8 feet  so we added one leg for this 16 foot long  shelving. Ana White   Easy and Fast DIY Garage or Basement Shelving for Tote