Benford's Law Calculator — Leading Digit Conformity Test
Enter the count of numbers in your dataset that start with each digit 1 through 9. The calculator computes the expected Benford distribution, compares it to your data using a chi-square test and Mean Absolute Deviation, and tells you whether the dataset conforms — a key tool in forensic accounting and data auditing.
χ² < 15.507 → Conforms to Benford's Law at 95% confidence (df = 8)
- 1
Expected count for digit 1
log₁₀(1 + 1/1) × 100 = 30.1Benford predicts ≈30.1% of numbers begin with 1 — the most common leading digit. - 2
χ² contribution (digit 1 example)
(30 − 30.1)² ÷ 30.1 = 0.0004Each of the 9 digits contributes (O − E)² ÷ E to the total chi-square. - 3
Total χ² (all 9 digits)
0.135Sum of all 9 contributions; critical value = 15.507 at df = 8, p = 0.05.
How does this calculator work?
Benford's Law predicts leading-digit frequencies: P(d) = log₁₀(1 + 1/d) — so digit 1 appears ≈30%, digit 9 ≈4.6%. Enter your observed digit counts; the chi-square test (critical value 15.507 at df=8, p=0.05) and MAD rating show whether your data conforms — a standard screen for fabricated numbers.
Formula
How this is calculated
Benford's Law (also called the First-Digit Law) states that in many naturally occurring datasets — financial ledgers, population figures, physical constants, river lengths — the leading digit is not uniformly distributed. Digit 1 appears as the first digit about 30.1% of the time, digit 2 about 17.6%, and digit 9 only about 4.6%. The probability follows P(d) = log₁₀(1 + 1/d).
The distribution arises from sets that span several orders of magnitude and grow (or are sampled from) multiplicatively rather than additively. Tax records, invoice amounts, stock prices and census populations typically conform; random-number tables and uniform distributions typically do not. This makes Benford's Law a widely used screen in forensic accounting, fraud detection and election-data auditing — fabricated numbers tend to cluster unnaturally (e.g., too many 5 s and 6 s) because people do not intuitively know the Benford distribution.
This calculator computes two conformity measures. The **chi-square statistic** (critical value 15.507 at df = 8, p = 0.05) is a classical hypothesis test: if χ² exceeds the critical value, reject conformity at 95% confidence. The **MAD (Mean Absolute Deviation)** from the Benford percentages gives a continuous rating: < 0.6% is close conformity, < 1.2% is acceptable, < 1.5% is marginal, and ≥ 1.5% signals nonconformity. Neither test alone proves or disproves fraud — they flag datasets that warrant closer examination.
Frequently asked questions
Datasets that span multiple orders of magnitude and result from multiplicative processes: income and expense amounts, population by city, stock prices, invoice values, scientific measurements with wide ranges. Datasets that do NOT conform by nature include assigned numbers (phone numbers, ZIP codes), data with a built-in minimum or maximum (heights of adults), or data drawn from a narrow range.
A failing chi-square means the digit distribution is statistically unlikely to arise by chance from a Benford-conforming process. This does not prove fraud — it could reflect natural clustering in your domain (e.g., most invoices are between $100–$999, biasing digit 1). It is a reason to investigate further, not a conclusion in itself.
At least 100 numbers are typically recommended; 300–500 or more gives much better statistical power. With very small samples (< 30), the chi-square approximation is unreliable. The MAD metric is less sensitive to sample size but still benefits from larger datasets.
Also known as
TG we-Calculate Editorial Team. (2026). Benford's Law Calculator — Leading Digit Conformity Test [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/benfords-law-calculator
TG we-Calculate Editorial Team. "Benford's Law Calculator — Leading Digit Conformity Test." TG we-Calculate. 2026. https://we-calculate.com/calculator/benfords-law-calculator.
TG we-Calculate Editorial Team, "Benford's Law Calculator — Leading Digit Conformity Test," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/benfords-law-calculator
@misc{wecalculate_benfords_law_calculator, title = {Benford's Law Calculator — Leading Digit Conformity Test}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/benfords-law-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
