# Calculating hours online

**URL:** <https://boards.straightdope.com/t/calculating-hours-online/75838>\
**Category:** Factual Questions\
**Created:** [August 11, 2001, 7:58pm UTC](https://boards.straightdope.com/t/calculating-hours-online/75838 "2001-08-11T19:58:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_Smithee](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Alan\_Smithee](https://boards.straightdope.com/u/Alan_Smithee)\
**Post date:** [August 11, 2001, 7:58pm UTC](https://boards.straightdope.com/t/calculating-hours-online/75838/1 "2001-08-11T19:58:56Z")

</div>

I don’t usually ask technical (ie, boring) questions like this here, but I’m going to now.

I would like to be able to calculate hours, such as from a time card. In other words, I want to be able to enter:  
5:15 am - 4:25 pm  
9:55 pm - 12:54 am  
and get back 14h 9m.

This is a simple calculation, and there are all sorts of web pages to calculate just about everything for you, but I can’t find one that will do this. Does anyone know of one? Would anyone like to design one?

---

<div class="post-metadata">

**Author:** ![bare](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bare/32/471_2.png) [@bare](https://boards.straightdope.com/u/bare)\
**Post date:** [August 11, 2001, 8:22pm UTC](https://boards.straightdope.com/t/calculating-hours-online/75838/2 "2001-08-11T20:22:10Z")

</div>

I don’t know of a calculator better or more simple than the mind.

If you want to calculate your time on line, ask your service provider. At least mine will e-mail you your hours in the last month just by requesting it.

---

<div class="post-metadata">

**Author:** ![Alan\_Smithee](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Alan\_Smithee](https://boards.straightdope.com/u/Alan_Smithee)\
**Post date:** [August 11, 2001, 9:24pm UTC](https://boards.straightdope.com/t/calculating-hours-online/75838/3 "2001-08-11T21:24:43Z")

</div>

Thanks a lot, **bare**. Why didn’t I think of adding up times from dozens of days in my head? :rolleyes:

I **have** done that, but it is very tedious and time consuming, and I don’t trust myself not to have made a mistake.

And BTW, I’m not trying to calculate my hours on line. I’m trying to calculate the hours I’ve worked over the past month so I can bill my employer accurately.

---

<div class="post-metadata">

**Author:** ![Baraqiyal](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@Baraqiyal](https://boards.straightdope.com/u/Baraqiyal)\
**Post date:** [August 11, 2001, 9:58pm UTC](https://boards.straightdope.com/t/calculating-hours-online/75838/4 "2001-08-11T21:58:10Z")

</div>

I wrote something like this for a client. Since she never paid for it, you’re welcome to it. [Here’s the link](http://members.aol.com/baraqiyal/timeclock.html). You may have to alter the JavaScript a little to make it do what you want.

---

<div class="post-metadata">

**Author:** ![Alan\_Smithee](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Alan\_Smithee](https://boards.straightdope.com/u/Alan_Smithee)\
**Post date:** [August 12, 2001, 4:47pm UTC](https://boards.straightdope.com/t/calculating-hours-online/75838/5 "2001-08-12T16:47:02Z")

</div>

Thanks, **Baraqiyal**. That’s pretty close to what I want. I don’t know JavaScript, so I can’t “improve” it, but I think it’ll be helpful anyway.

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [August 12, 2001, 8:45pm UTC](https://boards.straightdope.com/t/calculating-hours-online/75838/6 "2001-08-12T20:45:03Z")

</div>

how about using a spreadsheet? That’s what I’d use

---

<div class="post-metadata">

**Author:** ![IBBen](https://avatars.discourse-cdn.com/v4/letter/i/85f322/32.png) [@IBBen](https://boards.straightdope.com/u/IBBen)\
**Post date:** [August 13, 2001, 12:52am UTC](https://boards.straightdope.com/t/calculating-hours-online/75838/7 "2001-08-13T00:52:58Z")

</div>

Using Microsoft Excel you can determine the number of days, hours, and minutes it will take for Bill Gates to conquer the Universe. Simply subtract the times/dates and format the solution cell as a number _not_ a date.
