Two Standards, One Shared Foundation
TOTP and HOTP are both defined by IETF standards — RFC 4226 for HOTP and RFC 6238 for TOTP — and TOTP is explicitly built as a small extension of HOTP. Both generate a short numeric code from a shared secret key using HMAC hashing. The only structural difference is what drives the calculation: HOTP uses a counter that increments by one each time a code is generated, while TOTP uses the current time, divided into 30-second steps, as that counter instead. For the full mechanics of the TOTP side of this, see How TOTP Works Under the Hood.
Why TOTP Won Out for Everyday Consumer 2FA
Time is a variable both sides of the exchange already track independently and continuously — your device's clock and the server's clock are both always running, so they naturally stay roughly in sync without any coordination step. A counter, on the other hand, only advances when a code is actually generated. If you generate a code on your device but never submit it (say, you copy it and then get distracted), the counter on your device has moved forward while the server's counter hasn't, and the two fall out of sync. Repeated small mismatches like this eventually push HOTP-based systems outside their tolerance window, requiring a resynchronization step. TOTP sidesteps this entirely because time doesn't depend on how many codes were actually used — it just keeps moving forward at the same pace on both sides.
Where HOTP Is Still the Right Choice
HOTP hasn't been abandoned — it's simply used in narrower, more specific situations where its counter-based design is actually an advantage rather than a liability:
Hardware Tokens Without a Reliable Clock
Small, cheap hardware OTP tokens sometimes lack a precise internal clock or a way to keep one accurately synced over their multi-year lifespan without a battery replacement affecting timekeeping. A counter-based HOTP token sidesteps clock-drift problems entirely, since there's no time dependency to drift in the first place — the counter only moves when a button is physically pressed.
Fully Offline, Print-and-Use Scenarios
Some legacy systems print a numbered list of one-time codes in advance (essentially a physical HOTP sequence), where the "counter" is simply which entry on the printed list you're currently on. This works precisely because there's no time element to worry about keeping accurate.
Event-Driven Rather Than Time-Driven Actions
In certain systems, a code needs to be generated on-demand for a specific discrete action rather than tied to a rolling time window — HOTP's "generate exactly when needed, valid until used" model fits that pattern more naturally than a code that might expire mid-action.
Side-by-Side Comparison
| Property | HOTP | TOTP |
|---|---|---|
| Counter variable | Incrementing integer | Current time, in 30-second steps |
| Code validity | Valid until used (no expiry) | Expires after ~30-60 seconds |
| Sync risk | Counter drift if codes generated but unused | Minor clock drift, tolerated within a small window |
| Common use case | Hardware tokens, offline/print scenarios | Mobile and web authenticator apps |
| RFC | RFC 4226 | RFC 6238 |
Does This Distinction Affect You as a User?
For the overwhelming majority of accounts you'll ever protect with 2FA — email, social media, banking apps, work SSO — the service is using TOTP, and a browser-based authenticator like AuthBro or a mobile app handles it transparently. You'll only run into HOTP directly if you're issued a physical hardware token by an employer or a specific financial institution, in which case the device itself handles the counter logic and you simply press a button to get your next code.
HOTP didn't lose to TOTP on security grounds — it lost on convenience grounds for the specific case of software running on internet-connected, clock-aware devices. Where that assumption doesn't hold, HOTP is still the more practical choice.
