Skip to content
ENExplore Calculators

OTP Entropy Calculator

Work out otp entropy instantly with clear inputs, formula shown and shareable results.

About OTP Entropy Calculator

A six-digit OTP has only a million values and about 19.9 bits of entropy, which is weak by cryptographic standards. Its security comes almost entirely from rate limiting: with three attempts per 30-second window, the chance of a hit is 3 in a million per window, and NIST SP 800-63B requires exactly this kind of throttling for exactly this reason.

Formula

OTP guessing

code space = 10^digits; entropy = digits x log2(10); P(success per window) = attempts / code space

Worked example

With the default values below, OTP Entropy Calculator returns Entropy per code of 19.93. Change any input above and every figure here is recalculated in your browser.

Inputs used

OTP lengthaccepts 4–12 digits
6 digits
Validity windowaccepts 5–600 s
30 s
Attempts allowed per windowaccepts 1–100
3

Results

Entropy per code
19.93 bits
Distinct codes
1,000,000
Chance of guessing within one window
0.000300%
Expected windows before a successful guess
166,667

Step by step

  1. 1Values used
  2. 2OTP guessing
  3. 3Entropy per code= 19.93 bits
  4. 4Distinct codes= 1,000,000
  5. 5Chance of guessing within one window= 0.000300
  6. 6Expected windows before a successful guess= 166,667

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Should I use more digits?

Eight digits raises entropy to about 26.6 bits and is supported by TOTP, but rate limiting delivers far more protection per unit of user friction.

What limits does NIST require?

SP 800-63B mandates throttling of failed authentication attempts, commonly capped at around 100 consecutive failures before the account is locked or rate limited.

OTP Entropy Calculator | Calcrivo