Well, the correct answer to that question is “it depends”. A photovoltaic solar system can cost as little as a few hundred dollars or as much as millions of dollars.
Here is a quick table that shows the common range of size, costs, rebates, for various types of PV applications:
As a rule of thumb, it is safe to assume that on average a 1kW grid-tied system will cost about $3,000 to $10,000 ($3-10/W) depending on the size of the project and the types of materials used. This cost includes solar panels and balance of system (inverters, cables, disconnects; and in certain cases, batteries and charge controllers) as well as labor.
The cost of grid-tied systems range widely based on whether a back up battery system is attached to the system or not. Off-grid systems which always include a battery pack are therefore almost always more expensive than grid-tied systems on a per watt basis. Furthermore, the grid-tied systems have the advantage of being eligible for up to 50% of rebates and other kinds of incentives depending on your state and county.
A typical US home is 2,300 sq ft in size and uses about 1,000kWh of electric power per month. The cost of electricity is 10 cents per kW on average (but can be as high as 24 cents or as low as 7 cents depending on the state). The average location in the US has about 5 hours of solar resource. This means the average needs to generate 1,000kW of power to offset their $100/month electric bill. Given that an average home has access to (5 x 30 days) 150 hours of solar resource per month, in order to generate 1000kWh per month, a typical house would have to install a (1,000kWh/150hrs) 6.67kW solar system.
A basic grid-tied system (without a battery backup) will usually cost about $6-9/W including labor, before the rebates and incentives. Net cost after rebates could be as low as $3-4.5/W. So applying the above math to the average home, one can conclude that the average solar system will cost about (6,670W x 7.5$/W)= $50,025 before the rebates and incentives. After rebates and incentives, the cost could be as low as (6,670W x 3W/$) = $20,010. The rebates and incentives are continuously evolving. There are a whole slew of incentive programs, including the P.A.C.E program. You can see more information on rebates and incentives here.
Rebates and incentives apply to most grid-tied systems and unfortunately do not apply to Offgrid systems.