you live (location, direction your home faces), the amount of electricity you consume, your local utility, lease v ow, etc., all play critical factors in penciling out solar. And to be honest, it rarely does from an economic stand point.
That said, there are other reasons outside of economics that may make it a good decision for you.