In honest data that spans several orders of magnitude, about 30% of numbers start with the digit 1 — and under 5% start with 9. That lopsided pattern is Benford’s law, and this Benford’s Law Calculator tests any dataset against it: paste your numbers, and it counts the leading digits, lines them up against Benford’s expected frequencies, and delivers a chi-square verdict on whether your data follows the law or strays from it.
Worked Example: Twelve Numbers, One Verdict
The pre-loaded dataset — 10, 25, 33, 47, 52, 68, 71, 89, 94, 120, 250, 310 — has leading-digit counts of 2, 2, 2, 1, 1, 1, 1, 1, 1 for digits 1 through 9. Benford expects, out of 12 numbers, roughly 3.6 ones, 2.1 twos, 1.5 threes, then about one each of the rest. The chi-square statistic comparing the two comes out at 1.71, far below the 5% critical value of 15.51 for 8 degrees of freedom — so this little dataset is perfectly consistent with Benford’s law, exactly as it should be: with only twelve numbers, almost any plausible spread passes, which is itself the first lesson of the test. Benford analysis earns its keep on hundreds or thousands of values, where invented numbers — humans fabricating data overwhelmingly over-use middle digits and under-use 1 — drift measurably away from the curve and the chi-square climbs past the threshold.
The Law and Where the Logarithm Comes From
Benford’s law says the probability that the first significant digit is d equals log₁₀(1 + 1/d). The full expected table: 1 → 30.1%, 2 → 17.6%, 3 → 12.5%, 4 → 9.7%, 5 → 7.9%, 6 → 6.7%, 7 → 5.8%, 8 → 5.1%, 9 → 4.6%. The deep reason is scale invariance: data generated by multiplicative processes (prices, populations, river lengths, physical constants) spread evenly across the logarithmic scale, and a number’s leading digit is determined by where its fractional logarithm lands — the digit is 1 exactly when that fraction falls in the interval [0, log₁₀2), whose width is 30.1% of the whole. Newcomb noticed the pattern in 1881 from the grubby early pages of logarithm tables; Benford confirmed it in 1938 across 20 datasets from street addresses to atomic weights. The calculator’s chi-square simply formalizes the eyeball test: Σ (observed − expected)² / expected over the nine digits, large values signaling data that does not behave like naturally grown quantities.
When Benford Applies — and When It Cannot
The law needs data that ranges across orders of magnitude and arises from multiplicative or mixed processes: accounting ledgers, city populations, stock prices, file sizes, election vote counts by precinct (with care), scientific measurements. It does not apply to assigned numbers (invoice IDs, phone numbers), data with built-in floors or ceilings (adult heights in cm cluster at 1 regardless), prices engineered around psychological points ($0.99 endings), or small uniform ranges (ages 20–29 are almost all leading 2 by construction). Auditors at tax authorities and forensic accountants use Benford screening as a triage tool — a failed test justifies a closer look, never a verdict of fraud — and the same humility applies to this calculator’s output: a large chi-square says “this data’s digits do not look Benford,” and legitimate structural reasons may explain exactly that. Sample size cuts both ways: enormous datasets fail on trivial deviations, small ones pass almost anything.
Common Mistakes
Counting the first character instead of the first significant digit — 0.0047 leads with 4, not 0, and the calculator extracts the first non-zero digit after stripping signs and decimal points. Testing data that cannot satisfy the premises (bounded ranges, assigned numbers) and then “discovering” fraud in arithmetic. Reading a pass as proof of honesty: a sophisticated fabricator can manufacture Benford-perfect data, and honest-but-structured data can fail. Finally, ignoring sample size — quote the chi-square alongside the count, always, because the same statistic means different things at n = 12 and n = 12,000.
Beyond the First Digit: Second-Digit and Summation Tests
Forensic practice rarely stops at the first digit. Benford’s law extends to the second digit, whose expected frequencies decline much more gently — about 11.97% for 0, falling to about 8.50% for 9 — because by the second position the logarithmic curve has partially flattened. A dataset can pass the first-digit test while failing the second, and fabricators who learn to fake leading digits seldom fake the joint pattern. Auditors also run a summation test (the total value carried by numbers starting with each digit should be roughly equal across digits in Benford-conforming financial data) and a duplicates check. This page covers the headline first-digit test with its chi-square; treat a clean pass here as the first gate, not the whole audit.
Related Tools
Continue with the MSE Calculator, the Simpson’s Diversity Index Calculator, the Least to Greatest Calculator, or browse the full Statistics Calculators hub.
Frequently Asked Questions
What is Benford’s law in one sentence?
In naturally occurring datasets spanning orders of magnitude, the leading digit is d with probability log₁₀(1 + 1/d) — so 1 leads about 30.1% of the time and 9 only about 4.6%.
How does the chi-square verdict work?
It sums (observed − expected)² / expected across the nine digits. With 8 degrees of freedom, values above about 15.51 would occur by chance under Benford less than 5% of the time — the calculator flags those.
What data should I test?
Large, naturally grown, multiplicative data: ledgers, populations, prices, measurements spanning several orders of magnitude. Hundreds of values minimum for a meaningful signal.
Does failing a Benford test prove fraud?
No. It proves the digit distribution differs from Benford’s, which has many innocent causes — bounded ranges, assigned numbers, engineered prices. Auditors use it as a screening signal, not a conviction.
Why do fabricated numbers fail?
People inventing data spread digits almost uniformly, or favor middle digits — but nature gives 1 a 30% share. Human intuition about randomness is uniform; multiplicative reality is logarithmic.
What counts as the first digit of 0.0047?
Four — the first significant (non-zero) digit. Leading zeros and decimal points are stripped before counting, which the calculator handles automatically.