How 94287082 comes out of a secret and a clock
RFC 6238, the standard behind authenticator codes, ships with test values, so we can follow one code from start to finish and check every step. The test secret is the twenty ASCII characters 12345678901234567890. Authenticator apps show secrets in Base32, and in Base32 that secret is GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ. Paste that into the box above, set Digits to 8 and Algorithm to SHA-1, and you can compare your screen with the numbers here at any time by thinking back to one moment: 59 seconds after midnight on 1 January 1970, UTC.
Step one is the counter. TOTP divides the Unix time by the step length, 30 seconds, and throws away the remainder. At 59 seconds that is floor(59 / 30) = 1. Every second from 30 to 59 gives the same counter, which is why the code stays the same for half a minute and the countdown shows how much of the step is left.
Step two is the signature. The counter is written as 8 bytes, 00 00 00 00 00 00 00 01, and signed with HMAC-SHA1 using the secret as the key. The result is 20 bytes: 75a48a19d4cbe100644e8ac1397eea747a2d33ab in hex. Anyone with the secret and the time gets these exact bytes; anyone without the secret cannot predict a single one of them.
Step three, dynamic truncation, turns 20 bytes into a short number. Look at the last byte, ab. Its low four bits are b, which is 11, so the code is taken from the four bytes starting at position 11 (counting from 0): c1 39 7e ea. The top bit is cleared, so c1 becomes 41, and 41397eea read as a number is 1,094,287,082. The last eight digits are 94287082, which is the value printed in the RFC. Keep only six digits, as most sites do, and the code is 287082. The offset trick exists so the code does not always come from the same place in the signature.
That is the whole algorithm. The website does the same calculation with its copy of the secret and its own clock, and accepts your code if they agree. Most servers also accept the step before and after, which is why a clock a few seconds off still works but one a minute off does not. SHA-256 and SHA-512 variants work the same way with a longer HMAC, and some accounts use 8 digits or 60-second steps; an otpauth:// link spells all of this out, so the page reads it from the link when you paste one.
Two cautions. The secret is the account’s second factor: anyone who has it can make your codes forever, so paste only your own, and only on a device you trust. And this page is not a vault. It keeps the secret only while the tab is open, which is right for privacy and wrong for a backup. If you want to be able to recover your codes, store the secret or the setup link in a password manager, and use this page when you need a code from it.