Right from the Optima Battery page that I linked above:

After determining the size of inverter needed, you need to determine the size of battery (or batteries) required for the running time you want. The storage capacity of batteries is measured in "amp hours" (abbreviated "AH".) The definition of "amp hour" is the ability to provide 1 amp of power for 1 hour. To convert from total watts of load to AH, first use the formula Watts ÷ Volts = Amps. That will tell you the continuous amperage rating of your load. Then multiply that times the number of hours you want to run, and you have the required "amp hours" required from your batteries.

Example: Looking at the table above, you'll see that a laptop computer might require about 70 watts of power (at 120 volts.) So we first multiply 70 watts x 1.15 (to add 15% for the consumption of the inverter) and get 80 watts. Dividing 80 watts by 120 volts = .67 amps of constant load. A mid-size Optima deep cycle battery like the model D34 is rated 55 AH (amp hours) @ 12 volts. Because the inverter will be converting the battery's 12V current to 120V (which is greater by a factor of 10), we divide the battery's 55AH rating by that same factor of 10, and the result is that the D34 battery has a rating of 5.5AH @ 120V. If we then divide that 5.5AH battery rating by the laptop's consumption of .67 amps, we see that the Optima D34 deep cycle battery will run the laptop for 8.2 hours through an inverter.