Time Calculator

Doing math with times isn't as simple as doing math with regular numbers because times use a different base. Time Calculator simplifies this problem. It provides:

An intuitive, calculator-like interface

Support for multiple calculations

Limited support for multiplication and division (WARNING: Read the multiplication and division section of help before using those functions—or risk incorrect results.)

Memory functions

If you have any comments or questions, feel free to e-mail me.

Scott Severance

Time Format

The format for displaying times is hours:minutes:seconds (e.g., 2 hours, 30 minutes, and 15.4 seconds is displayed as 2:30:15.4). When entering times, the selection box (outlined in red) determines whether you are entering hours, minutes, or seconds.

Click : to advance the selection box. Alternatively, you can click directly on the calculator screen to set the selection box.

IMPORTANT NOTE: Time Calculator supports hours, minutes, and seconds. It doesn't yet know anything about days. Thus, hours outside the range 0-23 are acceptable. If you need to handle days, you can do a manual conversion. For example, 14:00:00 - 15:00:00 = -1:00:00. If you add 24 hours (-1:00:00 + 24:00:00), you'll get the time on the previous day (23:00:00). Remember that this is just a workaround, as Time Calculator has no idea about days. Support for days is on my list of features to add, but I don't have a whole lot of spare time these days.

Buttons

Most buttons work as expected. Here are some special buttons:

: Advances the selection box.

. Inserts a decimal point. This button is disabled if the selection box is not on the seconds field.

← Backspace key. Deletes the last number from the selected field.

AC Clears the the screen and resets the calculator. However, AC doesn't clear the memory.

C If the value on the screen is not 0:00:00, resets the screen without resetting the calculation. Otherwise, behaves like AC.

M+ and M− Add/subtract the value displayed on the screen to the value currently in memory; or, if memory is empty, sets memory.

MR Displays the value stored in memory on the screen, replacing whatever is currently on the screen.

MC Clears the memory.

Unless you want to multiply or divide a time by another time (you probably don't), be sure to enter the non-time factor in the seconds field. If you don't, you will get unexpected results. As a reminder, the selection box is moved to the seconds field whenever you click × or ÷.

Keyboard Shortcuts

To enter a number, type it. For other keys, refer to the table below (note that many buttons can be activated by several keys):

Button

Keys

Button

Keys

+

+P

−

-M

×

*T

÷

/D

=

=EnterE

.

.,V

←

B<Backspace

:

:TabRight ArrowSpaceS

C

CDeleteClear

AC

AEsc

M+

Q

M−

W

MR

R

MC

X

Help

H?

Keybd.Shortcuts

K

How can I enter 2 PM?

The calculator works with absolute times, so it is unaware of the time of day. You can't enter PM, just as you can't enter AM. Just enter the raw hours, minutes, and seconds.

If you're trying to find out how long you worked if you started at 8:22 AM and quit at 5:35 PM, you can convert to 24-hour time by adding 12 hours to every PM time. So, you can enter

5:35:00 + 12:00:00 − 8:22:00

to get the total time you worked, 9 hours and 13 minutes.

Is there an iPhone or Android app?

An Android app is planned, but not ready yet. An iPhone version is unlikely since I refuse to buy Apple products and thus have no way of testing such an app.

Some keyboard shortcuts don't work in all browsers. All such keys have alternatives. If the one you tried doesn't work, try one of the alternatives.

The ← Button doesn't work in older versions of Internet Explorer if the selected field contains more than one digit.

Key mapping

Users of the numeric keypad might prefer that the key . activated : instead of .. Here's an option you can set:

Map . to :

Output format

Some users may prefer times to be always displayed in minutes and seconds, instead of hours, minutes, and seconds.

Display time as:

Time Calculator 3.4

August 15, 2015

Added an option to display times in minutes and seconds instead of hours, minutes, and seconds. Thanks to Patrícia Bateira for the suggestion.

Added close button to help.

Certain versions of Chrome caused a problem by navigating back instead of deleting a number when the backspace key was pressed. Fixed.

Time Calculator 3.3.1

July 24, 2012

Fixed a bug in the memory feature that was introduced by the change to BigDecimal in version 3.3.

Fixed the stripTrailingZeroes functionality.

Time Calculator 3.3

December 30, 2011

Fractional seconds are now calculated correctly. This has been a longstanding bug, and I'm happy to have it fixed thanks to the awesome BigDecimal.js.

Time Calculator 3.2.1

September 12, 2011

Fixed two Internet Explorer bugs:

When there is another window open, the IE window with the time calculator no longer jumps behind all other windows.

The operators are no longer cut off from the edge of the tape in IE.

Time Calculator 3.2

September 11, 2011

Hopefully fixed a bug that caused Internet Explorer windows to jump behind all other windows in some cases.

Fixed several bugs related to the history tape. The tape should now be easier to understand.

Enhanced the documentation by adding a FAQ section and updating the bugs section to remove obsolete bugs and to reflect the problems with floating point math.

Time Calculator 3.1

November 12, 2010

Users can now click entries on the history tape to copy the value to the calculator screen. Thanks to Kevin Matzdorf for suggesting this.

Fixed a long-standing bug related to multiple calculations. Now, clicking operation buttons after a result is displayed, or clicking different operation buttons in succession works correctly.

Better error handling

Minor fixes/enhancements

Time Calculator 3.0.4

November 3, 2010

The calculator now remembers the value of the ". as :" keyboard setting.

Time Calculator 3.0.3

October 28, 2010

Added note to the "Basic Usage" section of the help explaining Time Calculator's lack of support for days. Also suggested a workaround.

Fixed some typos.

Time Calculator 3.0.2

August 12, 2010

Fixed a bug that kept Time Calculator 3 from working in older versions of Internet Explorer.

Minor UI changes.

Time Calculator 3.0.1

August 8, 2010

Changes made to 3.0 broke older versions of Internet Explorer. Since I don't have access to any version other than 8, I'm not able to find and fix the problem. This version presents users of older versions with several workarounds.

Time Calculator 3.0

August 1, 2010

Time Calculator now has a memory.

Added a calculation history panel.

Vastly improved keyboard handling. Using the calculator via the keyboard should now be much simpler. See the keyboard help section for details.

Added an option, located under keyboard shortcuts, to map the . key to the : button in order to simplify entering times via the numeric keypad. This option is disabled by default. Thanks to Todd Andrews for the suggestion.

Several user interface enhancements.

Significant code cleanup.

Time Calculator 2.4

October 28, 2008

Replaced the algorithm to convert from seconds to hours, minutes, and seconds. The old algorithm was really inefficient, especially for large values.

Time Calculator 2.3

May 4, 2008

Added keyboard shortcuts

Time Calculator 2.2

February 28, 2008

Clarified the legal language as regards distribution

Dropped the 2 from Time Calculator, and dropped the link to Time Calculator 1

Time Calculator 1.0

NOTE: The following terms apply to the Internet edition of Time Calculator (which you are currently using). Separate terms apply to the download edition.

You may freely use Time Calculator, but if you want to copy it, mirror it, distribute it, modify it, or create a derivitive work, you need my permission.

The intent of these terms is to ensure that Time Calculator is only available on one website. You may, of course, link to Time Calculator. You don't need permission to do so. Restrictions on how you may link (as some sites use) are bogus. However, I request that you don't frame my site.

Time Calculator has no warranty of any kind whatsoever (not even an implied warranty). Use it at your own risk. If your jurisdiction does not permit such warranty exclusions, you may not use Time Calculator.

If you have any questions or suggestions, drop me a line. Many of the features of Time Calculator are the direct result of user feedback.

Copyright Notices

The following notice applies only to the BigDecimal.js library used by this calculator:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.

Time Calculator requires Javascript in order to function. There is no way to remove this dependency. Please enable Javascript in order to use this calculator.

To enter numbers, just start typing. To
change fields, press Space or :.