How this calculator works
A positive modulus gives residues from zero through one less than the cycle size. Clock mode uses 24 positions. List mode treats the first item as index zero. Integer mode accepts long digit strings without converting them to floating point. The table follows forward steps from the start, up to 24 steps; the offset result may involve many more revolutions.
Formula
r = x - m floor(x/m), with 0 ≤ r < m. For a clock x=start+offset and m=24; for a list m=length. A nonpositive equivalent is r-m when r is nonzero.
Worked example
Starting at 23:00 and adding four whole hours gives 27 modulo 24 = 3, or 03:00. Starting at list index 1 and moving backwards four places in a five-item list gives -3 modulo 5 = 2.
Advertisement
Frequently asked questions
Does clock mode include minutes?
It handles whole hours only. For finer clock arithmetic, convert the task to whole minutes and use a suitable modulus in integer mode.
Why is -3 modulo 5 equal to 2?
Adding one cycle of five reaches 2. Both values identify the same position in a five-position cycle.
Is this a scheduling or timezone tool?
No. It wraps numerical positions. Dates, daylight saving changes and elapsed real time require a calendar-aware calculation.