the average cost to install a generator is $4,550 or $400 to $11,500