The cost of solar has come down _a lot_ in the last few years. At this point the cost of a solar installation is dominated by the cost of the humans who have to deal wit the city to get permits and physically install the components on the roof. For a 6kw system (typical for a single family house in California) the cost of the panels is about $3000, the inverter is about $2000, the auxiliary components (racks, wiring, disconnect, etc) is about $1000. If you are doing it on new construction the install is basically free, but as a retrofit hiring a contractor that will work with the city to get the permits and install the panels is about another $1,000-$10,000 depending on who you talk to and how complicated the installation is (some people need a new electrical service for their house, which runs almost $5k in itself, etc)
That system should produce about 10,000 kw*hr of energy over the year, so the payback excluding installation would be under 5 years.