How to calculate battery size?
First you need to have a rough idea how much power in Watt (W) or Ampere (A or Amp)) you are going to use and for how long. In the end you battery size will detemine how long you have power, when the sun has set. So there is different approaches you can have to this.
Look at labels
You can look at the labels of your devices on the AC side and ther it most often will say how many Watt or Amp's it will take. Since you will not use all items all at once you will need to do a rough calculation.
Measure your devices
You can also buy a Clamp Meter and do some basic measuring of your devices on the AC side or the DC side. Add all up and think of how long you will use each item and do the calculation.
*The 50% battery rule
It is alway best to calculate for more than you think you will use or make sure you can upgrade with more solar or batteries later. Also if you drain a battery more than 50% of it's capacity you will shorten the lifespan of the battery much faster than if you always change at 50% or more. Also check the battery rated load, normally a 100Ah battery is only rated for max 5A. Each discharge and recharge cycle uses up some of the battery's life. The deeper the discharge, the heavier the discharge current, the heavier the charge current, the more life it uses up. ... So double the initial outlay (twice as many batteries to buy) results in a saving of 50% (they last 3 times longer).
If you want to calculate more in depth then here you go
To size a battery bank we take the hours needed continuously x watts = total watts/DC volts=amps needed.
All Deep Cycle batteries are rated in Amp Hours (AH). An ampere hour (abbreviated Ah, or sometimes amp hour) is the amount of energy charge in a battery that will allow one ampere of current to flow for one hour. An ampere is a unit of measure of the rate of electron flow or current in an electrical conductor.
Example 1: If you have an appliance that draws 20A and you use it for 20 minutes, then the amp hours used would be:
A x H = AH
20 x (20 mins / 60 Mins (1hr) = AH
20 x 0.333= 6.67AH
Example 2: If your 12v Camping Fridge is rated 5A, it should take 20 hours to drain the battery down to 10,5V, provided that the battery is new and was fully charged.
Example 3: 3 hours of run time needed * 1500 watts = 4500 watts total / 12 volts DC = 375 amps. You will need a total of 375 amps of stored power in the batteries. I recommend depleting your batteries to ~50% so keep this in mind when you are calculating the number of batteries needed.
Example 4: Let’s say you purchase a 2000 watt inverter 12 Volt. If you max out the inverter at 2000 watts, you are pulling 2000 watts /12 volts = 166.6 DC amps per hour. If you use a 200 amp 12 volt battery you would divide 200 amp battery / 166.6 amps = 1.2 hours of run time. This is if you plan on fully depleting the battery, which I DON’T recommend. We recommend 50% depth of discharge. Since we recommend 50% depth of discharge, you would divide 1.2 hours /50% = .60 hours. If you use 30% depth of discharge you divide 1.2 hours/30%=.36 hours.
Example 5: Let's say you have a load of 500W and you are running a 24v system. 500W/24V=20.83A. Let's say you have a 100Ah battery. 100Ah/20,834=4.8h
4.8 Hours is the theoretical run time before the battery is flat*. The term theoretical is used because in practice, as the battery voltage decreases, the Amps drawn by the load increase proportionally. Due to this, total runtime will be slightly lower. Also a 100Ah battery have a rated load normally 5A, if you go above it this will also shorten the lifespan.
To work out the total battery capacity required to run this equipment for twenty hours we need to establish how many AH we require. 500W / 24V = 20.83A
We’d like the appliances to run for 20 Hours. 20.83A x 20 Hours = 416.6AH -> x2 for the 50% battery rule = 833.2AH -> 8 x 100AH Batteries.
More technical knowledge:
As you’ll note from the equation above, The faster a battery is drained (discharged), the less overall amperage is available. The battery’s AH rating decreases the faster you use it. This is This is called the Peukert Effect. The Peukert Effect is directly related to the internal resistance of the battery. If you discharge a battery over the course of 100 hours, the AH rating looks higher than if you discharge that same battery over the course of an hour. Because of the variances that could occur in AH ratings, an industry standard was implemented.
For deep cycle batteries, the 20 Hour Rate is the accepted AH rating time period for the majority of Deep Cycle Batteries. The 20 Hour Rate means that the battery is discharged down to 10.5V over a 20 Hour Period while the total actual AH that it supplies are measured. Sometimes ratings at the 6 Hour Rate and 100 Hour Rate are also given for comparison and for different applications. The 6 hour Rate is often used for industrial batteries, as that is a typical daily duty cycle. Sometimes the 100 Hour Rate is given just to make the battery look better than it really is, but it is also useful for figuring battery capacity for long-term backup.