Quite honestly, I have looked, and I don't understand your math. logged out is the minutes since midnight, but I don't get numOfMins, or how you are calculating LoggedIn.
The numbers displayed in the first post, are just the datediff in seconds from logged out to logged in.
So, for example if I log in at 8 and out at 4, there is a diff of 8 hours or 8*3600 seconds, but if you take 4pm-8am-diff you get (4-8)-(4-8) which is 0, so that is what I was saying about your equation, I would expect a small number. Yes, I agree that 8/3 if off but I can't follow what you have done. Yes, it should be consistent.
What I would suggest to track it down it to print each of your variables that you are using for the calculation out on the report. You will probably see what has gone wrong when you see the intermediate values.
HTH