← All tools

Benford's Law Analyzer

Benford's Law says that in many naturally occurring datasets, the leading (first significant) digit is 1 about 30% of the time, 9 only about 4.6%, following P(d) = log₁₀(1 + 1/d). This tool extracts the leading digit of every number you paste, compares the observed distribution to the Benford expectation, and reports a chi-square fit. Useful as a quick sanity check on accounting, population, or scientific data — large deviations can signal fabricated or constrained values. Everything runs locally in your browser.

Data (one number per line, or comma / space separated)

Summary

Distribution

For each value the tool takes the first significant digit (the leading nonzero digit, ignoring sign, decimal point, and leading zeros — so 0.0034 → 3, -12.5 → 1, 340 → 3). Zeros are excluded (they have no nonzero leading digit). Benford's expected proportion is P(d) = log₁₀(1 + 1/d) for d = 1…9, which sums to 1. The chi-square statistic is χ² = Σ (O − E)² / E with expected counts E = n·P(d) and 8 degrees of freedom (critical values: χ²₀.₀₅ ≈ 15.51, χ²₀.₀₁ ≈ 20.09). A high χ² relative to these doesn't prove anything, but flags the data as a poor Benford fit. Benford works best on positive data spanning several orders of magnitude; it does not apply to assigned IDs, uniform ranges, or data with a hard min/max. Pairs with the Statistics, Histogram, and Frequency tools. Everything runs locally — nothing leaves your browser.