Work out totp time drift instantly with clear inputs, formula shown and shareable results.
TOTP derives the code from floor(unix time / step), so any clock difference larger than the step produces a different code. Servers therefore accept a window of adjacent steps, typically one either side, which tolerates 30 seconds of drift in each direction. Every extra step of tolerance triples or expands the number of simultaneously valid codes, weakening the factor proportionally.
TOTP validation window
counter = floor(unix time / step); tolerated drift = window x step; codes valid at once = 2 x window + 1
Each additional step multiplies the number of valid codes, increasing both guessing probability and the replay window. One step either side is the usual compromise.
Run NTP on servers and store a per-user drift correction learned from successful authentications, rather than widening the window for everyone.