Before you begin to size a system for your existing building, Texas Solar Power Company recommends that you implement several energy management techniques:

Change all incandescent and halogen light sources to LEDs. Local retailers are great source for these indoor or outdoor lamps and fixtures. Most LEDs will fit into existing lamp sockets.

Add additional insulation to your attic walls and floors where possible. Use pipe insulation on heated water pipes.

Add shading devices and/or solar screens to your east, south, and westfacing windows. The southfacing screens you may want to take off in the winter for solar heat gain.

Purchase only Energy Star rated appliances and air conditioning equipment.

Use natural gas or propane appliances where possible for cooking, central heating, water heating, and your clothes dryer.
Determine your power needs:
If your system is tied to the grid, simply look at your electric bill to find the number of Kilowatthours (kWh) you use in a month. Remember that your summer bills may be higher than winter, or vice versa.
Multiply your kWh by 1000 to get watts. Divide by 30.5 days per month, and then divide by 6 (or however many hours of good sunlight you expect your site to receive).
Finally,divide that number by the output of the solar module you intend to use (i.e. 350 watts) and your result is the number of modules you will need.
If your building is not connected to the utility grid, add up the amperage of all your anticipated electrical loads. Multiply this amperage by 120 (your AC voltage) to get your maximum wattage.
Then divide by 4 to give you a rough idea of your hourly power needs.
Sizing a minimum battery bank:
Having a battery backup is essential if you're off the grid, but it can be a valuable accessory for your gridtied home or business too. There are three important rules of electricity to remember for this discussion:

Current is measured in amps, potential energy is measured in volts, and power is measured in watts. We find wattage by multiplying amps and volts. We can also find current by dividing watts by volts, and volts by dividing power by current.

In order to add voltage, we connect batteries in series (negative to positive to negative, and so on): If we want a 48volt system, we would connect four 12volt batteries in series, or eight 6volt batteries, for example. The amperage is not additive in series.

In order to build current, we connect batteries in parallel (positive to positive, and negative to negative). If we want 200 amps per hour and we're using a 50amp/hour battery, we need four rows of these batteries, connected in parallel. Voltage is not additive in parallel.
To determine how many batteries you would need, first calculate your average hourly watt needs, and divide by 120 volts AC to find amperage per hour.
The minimum battery bank for offgrid use is typically designed for fourteen hours – the time from sundown to sunup. If you're on the utility grid, you need enough reserve to last through a power failure – usually four hours at most.
Your system can be 12, 24, or 48volts DC. Of these, 48volt is most common because of its greater efficiency. The type of system determines the multiple you will now find your DC amp hour requirement. This multiple is 10 for a 12volt system, 5 for 24volt, and 2.5 for 48.
So, multiply your amps per hour from the last paragraph (let's assume 10 amps/hour) by the multiple for your system (assume 48volt) to get your DC amp/hours (25).
Select the deepcycle battery you will be using and determine the reserve amps for that battery. Multiply your amps per hour (from above) by 14 hours. This gives your battery reserve amp as required.
Divide that by battery manufacturer reserve amps, and you will know how many rows of batteries in parallel you need. The number of batteries in series in each row is determined by the battery voltage. Batteries are most commonly 6 or 12 volts.
Now divide the system voltage (12, 24, or 48) by the voltage of your batteries (6 or 12). This gives you the number of batteries per row.
Finally, multiply the number of batteries per row by the number of rows to find the total number of batteries.
EXAMPLE:
Let's say we're building an offgrid system. Our monthly energy requirement is 576.45 kWh.
 576.45 kWh x 1000 = 576,450 watts per month
 576,450 / 30.5 = 18,900 watts per day

18,900Watts / 6 hours sunlight = 3150 watts per hour (minimum)
Solar Modules:
Assume we're using a 350 watt module:
 3150 / 350 = 9 modules

This would be wired in 3 strings of 3 panels which = 9 panels
Batteries:
 18,900 watts per day /120 volts AC = 158 amps per day
 158 amps / 24 hours = 6.58 amps per hour
 Assume a 48 volt DC system, and a 12 volt 105 amp hour battery
 6.58 amps DC x 2.5 (48 volt multiplier) = 16.45 amps
 16.45 amps x 14 hours = 230.3 amps
 230.3 amps /105 amps = 2.19 battery rows (Round up to 3)
 48volt DC system /12volt battery = 4 batteries per row
 3 rows x 4 batteries = 12 batteries total