# Calculating kWh from multiple watt readings

I have a file which contains watt readings for various times throughout the day. A reading is stored roughly every 6 seconds.

206,2012/04/24 00:00:05
400,2012/04/24 00:00:21
300,2012/04/24 00:00:23
90,2012/04/24 00:00:29


I have two methods of working out a total kilowatt-hour figure from the above readings.

Method 1:-

I take an average of the watt reading, so 206+400+300+90 = 790 / 4 = 197.5

Then i work out the total range of the file, so 29 - 5 = 24 seconds.

Then i work out the kWh by converting the avg. watts to kW 197.5 / 1000 = 0.1975 Convert the seconds to hours, 24/3600 = 0.006666666 Then 0.1975 * 0.00666666666666667 = 0.00131666 kwh.

The other method i have is to work out the kwH per line and keep a running total:-

I do this by working out how long the first reading lasted by subtracting the second readings time value from the first. We assume the last line lasted 6 seconds as we havent got a reading after it to distinguish its length.

206,2012/04/24 00:00:05    lasted 16 seconds             so 206 for 16 seconds = ? kwh
400,2012/04/24 00:00:21    lasted 2 seconds              so 400 for 2 seconds = ? kwh
300,2012/04/24 00:00:23    lasted 6 seconds              and so on....
90,2012/04/24 00:00:29     assume last record lasted 6 seconds


I then work out the kwh per line and keep a running total of the kwh reading.

Question is, which is more accurate, and would there be a massive difference in the accuracy of the two methods.

-