Mathematical Standards

Calculation Methodology & Formulas

At ThisThatHub, transparency is paramount. Below is the precise mathematical documentation of how our engine normalizes time values, handles cross-midnight shifts, deducts breaks, and converts clock time into decimal hours.

1. Time Normalization & Parsing

All user inputs (whether entered as standard 12-hour AM/PM like "8:00 AM", 24-hour military like "1730", or shorthand numbers like "8") are normalized into an integer value representing minutes elapsed since midnight (0 to 1439):

Total Minutes = (Hours × 60) + Minutes

For PM times (excluding 12:00 PM noon), 12 hours (720 minutes) are added. For 12:00 AM midnight, the hour is evaluated as 0.

2. Elapsed Duration & Midnight Crossover

To determine the gross elapsed time of a work shift:

Standard Same-Day Shifts (End ≥ Start):Gross Minutes = End Minutes − Start Minutes
Overnight Shifts Crossing Midnight (End < Start):

When a worker clocks in during the evening (e.g. 10:00 PM = 1320 min) and clocks out the following morning (e.g. 6:30 AM = 390 min):

Gross Minutes = (1440 − Start Minutes) + End Minutes

Example: (1440 − 1320) + 390 = 120 + 390 = 510 minutes (8 hours and 30 minutes).

3. Unpaid Break Deductions

Net payable work hours subtract unpaid break minutes directly from gross shift duration:

Net Worked Minutes = Max(0, Gross Minutes − Unpaid Break Minutes)

Validation safeguard: If the user inputs a break duration exceeding the total shift length, the engine flags a validation warning rather than outputting nonsensical negative work hours.

4. Decimal Hours Conversion

Payroll accounting software requires hours formatted in base-10 decimal numbers:

Decimal Hours = Round((Net Worked Minutes ÷ 60), 2 decimal places)

For high-precision needs, the engine can also output to 4 decimal places: `Round((Minutes ÷ 60), 4)`.

5. Overtime & Gross Pay Estimation

When an hourly wage rate is entered, pay is calculated from user-defined thresholds:

Regular Hours = Min(Total Decimal Hours, Regular Threshold)
Overtime Hours = Max(0, Total Decimal Hours − Regular Threshold)
Regular Pay = Round(Regular Hours × Hourly Rate, 2)
Overtime Pay = Round(Overtime Hours × (Hourly Rate × Multiplier), 2)
Estimated Gross Pay = Regular Pay + Overtime Pay

Standard Conversion Table

Minutes to Decimal Hours Reference Table

Standard U.S. Payroll Conversion (1–60 min)
MinDec
1 min0.02
2 min0.03
3 min0.05
4 min0.07
5 min0.08
6 min0.10
7 min0.12
8 min0.13
9 min0.15
10 min0.17
11 min0.18
12 min0.20
13 min0.22
14 min0.23
15 min0.25
MinDec
16 min0.27
17 min0.28
18 min0.30
19 min0.32
20 min0.33
21 min0.35
22 min0.37
23 min0.38
24 min0.40
25 min0.42
26 min0.43
27 min0.45
28 min0.47
29 min0.48
30 min0.50
MinDec
31 min0.52
32 min0.53
33 min0.55
34 min0.57
35 min0.58
36 min0.60
37 min0.62
38 min0.63
39 min0.65
40 min0.67
41 min0.68
42 min0.70
43 min0.72
44 min0.73
45 min0.75
MinDec
46 min0.77
47 min0.78
48 min0.80
49 min0.82
50 min0.83
51 min0.85
52 min0.87
53 min0.88
54 min0.90
55 min0.92
56 min0.93
57 min0.95
58 min0.97
59 min0.98
60 min1.00