Intermediate

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.
Numbers starting with 1 — Benford expects 30.1%
Numbers starting with 2 — Benford expects 17.61%
Numbers starting with 3 — Benford expects 12.49%
Numbers starting with 4 — Benford expects 9.69%
Numbers starting with 5 — Benford expects 7.92%
Numbers starting with 6 — Benford expects 6.69%
Numbers starting with 7 — Benford expects 5.8%
Numbers starting with 8 — Benford expects 5.12%
Numbers starting with 9 — Benford expects 4.58%
Chi-square statistic (χ²)
0.135

χ² < 15.507 → Conforms to Benford's Law at 95% confidence (df = 8)

Total numbers
100
Benford conformity (χ²)
Yes (p > 0.05)
MAD from Benford (%)
0.286 %
MAD rating
Close conformity
Critical χ² value (df=8, p=0.05)
15.507
Digit 1: observed 30% vs expected 30.1%30%
Digit 2: observed 18% vs expected 17.6%18%
Digit 3: observed 12% vs expected 12.5%12%
Digit 4: observed 10% vs expected 9.7%10%
Digit 5: observed 8% vs expected 7.9%8%
Digit 6: observed 7% vs expected 6.7%7%
Digit 7: observed 6% vs expected 5.8%6%
Digit 8: observed 5% vs expected 5.1%5%
Digit 9: observed 4% vs expected 4.6%4%
30%
18%
12%
10%
8%
7%
6%
5%
4%
1
2
3
4
5
6
7
8
9
Observed leading-digit distribution (%)
Step by step
  1. 1

    Expected count for digit 1

    log₁₀(1 + 1/1) × 100 = 30.1
    Benford predicts ≈30.1% of numbers begin with 1 — the most common leading digit.
  2. 2

    χ² contribution (digit 1 example)

    (30 − 30.1)² ÷ 30.1 = 0.0004
    Each of the 9 digits contributes (O − E)² ÷ E to the total chi-square.
  3. 3

    Total χ² (all 9 digits)

    0.135
    Sum of all 9 contributions; critical value = 15.507 at df = 8, p = 0.05.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

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
P(d) = log₁₀(1 + 1/d) • χ² = Σ [(O − E)² / E] • MAD = Σ |obs% − exp%| / 9
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

benfords law test
first digit law calculator
leading digit distribution
fraud detection statistics
chi square benford test
newcomb benford law
data conformity check

APA

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

Chicago

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.

IEEE

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

BibTeX

@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?