InfyCalculator
📊

Benford's Law Calculator

Test a set of numbers against Benford’s first-digit law — observed vs expected digit frequencies, chi-square p-value and mean absolute deviation with Nigrini’s conformity bands.

Numbers to test
Loading calculator…

How it works

P(first digit = d) = log₁₀(1 + 1/d); MAD = (1/9)·Σ|observed% − expected%|; χ² = Σ (O − E)²/E on 8 df

Many naturally occurring datasets — invoice amounts, populations, stock prices — have leading digits that follow Benford’s logarithmic distribution: 1 appears about 30% of the time and 9 under 5%. Numbers that span several orders of magnitude and are not artificially bounded follow it; assigned numbers (phone numbers, IDs) and rounded prices do not. Auditors use the deviation to flag fabricated figures. Nigrini's MAD bands (0.006 / 0.012 / 0.015) are more useful than chi-square for large samples, where trivial deviations become “significant”.

Worked example

Thirty invoice amounts: 15 begin with 1 (50% vs 30.1% expected) — MAD 0.032, nonconformity, χ² p = 0.05. With real data expect thousands of values before reading much into it.

Frequently asked questions

How many numbers do I need?

At least a few hundred for reliable first-digit tests; small samples fluctuate widely even when the source is genuine.

Does it work for any data?

No — it needs data spanning orders of magnitude without imposed minimums or maximums. Heights of adults, for instance, never conform.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.