Statistics

Benford's Law Detector

Detect anomalies using Benford's Law

Data input

Paste numbers or upload a file and analyze the leading digit.

Tokens detected: 0Valid values: 0Ignored: 0

Upload file

Accepts .txt or .csv. Symbols, zeros, and negatives are ignored.

Preset datasets

Synthetic generator

Results and conformity

No data

Traffic light based on mean absolute deviation.

MAD
0.000
Add data to compute MAD.
Chi-square
0.00
p-value: 1.000

Add data to evaluate the chi-square test.

Using a typical 5% significance level.

Detail table

DigitObserved (n)Observed (%)Expected (%)Difference

About this tool

Benford's Law states that in many real-world datasets, the probability that the leading significant digit is dd follows the logarithmic distribution P(D=d)=log⁡10(1+1d),d∈{1,…,9}P(D=d) = \log_{10}\left(1 + \frac{1}{d}\right), \quad d \in \{1,\ldots,9\} giving probabilities of 30.1%, 17.6%, 12.5%... down to 4.6% for digit 9. This law emerges in data spanning several orders of magnitude that result from multiplicative processes: prices, populations, financial transactions, physical constants.

The mathematical reason is that when multiplying random variables, their logarithms are added, and by the central limit theorem they tend to distribute approximately uniformly on a logarithmic scale, implying that leading digits follow Benford's distribution. Deviation from this law is quantified with the chi-squared statistic χ2=n∑d=19(Od/n−Pd)2Pd\chi^2 = n\sum_{d=1}^{9}\frac{(O_d/n - P_d)^2}{P_d} where OdO_d is the observed frequency of digit dd.

This tool compares the distribution of leading digits in your data with Benford's theoretical distribution and calculates the goodness-of-fit statistic. Data fabricated by people tends not to follow this law because human intuition does not reproduce logarithmic patterns, making it a tool for detecting accounting fraud.