I was wondering if there is a set simple equation to figure out how much time is left

This is based off my job and trying to figure out how to solve the time stickers easier with a 24 hour time scale.

for example: a Material's Max time out allowed is 322 hours. It came out on 7/13/10 at 0030 hour and went in at 7/14/10 1350 hour. We would have to figure out the total out time between the out and in time and subtract it from the total max time. Then then material would come out again at 7/14/10 at 2330 hour and went back in on 7/15/10 at 0300 hour. Figure out the total time out for the second time and subtract that from the remaining time out again to get the new amount of time left on that material. All this time i've been doing each sticker step by step changing the time into 100 scale from 60 minutes scale and usually takes me like 10 mins to do each sticker. So I'm just wondering if there's a simple equation i can use to decrease the amount of time it takes me to do all this. Thank you