Percentages and Math

Benford’s Law Digit Analyzer

Paste a list of amounts to see how closely their first digits follow Benford’s law.

Your numbers

Separated by lines, spaces, tabs or semicolons. Signs, dollar signs and thousands commas are ignored. Zeros are skipped.

Digits to test

Result

Mean absolute deviation

0.00636

Acceptable conformity using Nigrini’s published bands.

Mean absolute deviation (MAD)
0.00636
Conformity band
Acceptable conformity
Chi-square
1.029
Degrees of freedom
8
p-value of chi-square
0.9981
Numbers used
100

First digit

DigitCountExpectedShareBenford share
13030.1030.00%30.10%
21817.6118.00%17.61%
31312.4913.00%12.49%
499.699.00%9.69%
587.928.00%7.92%
666.696.00%6.69%
755.805.00%5.80%
875.127.00%5.12%
944.584.00%4.58%
How this was calculated
  1. Benford’s law says the chance that the first digit is d equals log10(1 + 1/d). A 1 leads about 30.1 percent of the time and a 9 about 4.6 percent.
  2. For each digit the page compares the observed count with n x log10(1 + 1/d). Chi-square adds up (observed - expected)^2 / expected, and MAD averages the absolute gap between the observed and expected shares.
  3. The conformity bands for MAD (0.006, 0.012, 0.015) are the limits published by Mark Nigrini for the first digit. Chi-square grows with the sample size, so a large list can fail it with tiny differences. MAD is less sensitive to that.
  • Data that spans several orders of magnitude, such as invoices, populations or account balances, tends to follow Benford’s law. Assigned numbers, narrow ranges and rounded figures usually do not. A mismatch is a reason to look closer, not proof of anything.

Calculated using SumPanda.com · https://sumpanda.com/benfords-law-digit-analyzer/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the benford’s law digit analyzer

  1. Paste the numbers separated by lines, spaces, tabs or semicolons. Dollar signs, signs and thousands commas are ignored.
  2. Choose to test the first digit or the first two digits.
  3. Read the mean absolute deviation and its conformity band first, then chi-square, its p-value and the table.
  4. Compare the observed share of each digit with the Benford share.

Formula

P(d) = log10(1 + 1/d) for the first digit d = 1 to 9 (or d = 10 to 99 for two digits)

expected count = n x P(d), chi-square = sum of (observed - expected)^2 / expected

MAD = average of |observed share - expected share|

Chi-square has 8 degrees of freedom for the first digit and 89 for two digits. The mean absolute deviation is compared with published conformity limits.

The first 100 Fibonacci numbers

The first digits of the first 100 Fibonacci numbers are counted as 30, 18, 13, 9, 8, 6, 5, 7 and 4 for the digits 1 to 9. Benford’s law expects 30.10, 17.61, 12.49, 9.69, 7.92, 6.69, 5.80, 5.12 and 4.58. Chi-square is 1.029 with a p-value of 0.9981, and the mean absolute deviation is 0.00636, which is in the acceptable band.

A list of the 900 consecutive integers from 100 to 999 has every first digit equally often, so it is flagged as nonconforming.

When Benford’s law applies

The law holds for data that grow across several orders of magnitude, such as invoice amounts, populations, river lengths or account balances. It does not apply to numbers assigned in a narrow range, such as ZIP codes, phone numbers or heights of adults.

A mismatch is a reason to look more closely, not proof of a problem. Rounded prices, price points and rules like approval limits all change the first digits for honest reasons.

Chi-square or MAD

Chi-square grows with the size of the list, so a very large list can fail it with differences that are tiny in practice. The mean absolute deviation does not depend on the size of the list in the same way, so the page shows both.

The conformity limits for the mean absolute deviation (0.006, 0.012 and 0.015 for the first digit; 0.0012, 0.0018 and 0.0022 for two digits) are the ones published by Mark Nigrini. They are rules of thumb. Short lists are noisy, so use at least a few hundred numbers for real work.

Assumptions and limits

  • The first significant digit is read from the number itself, ignoring signs, decimal points and leading zeros.
  • Zeros and entries that are not numbers are skipped, and the count of skipped entries is shown.
  • At least 30 usable numbers are required.
  • The p-value comes from the chi-square distribution with the degrees of freedom shown.
  • Up to 50,000 numbers are read.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What does a high p-value mean?

It means the digits are close to what Benford’s law predicts, so there is no evidence against it. It does not prove that the numbers are genuine or free of manipulation.

Why test two digits?

The first two digits give 90 groups, so a test can pick up patterns that the first digit hides, such as many amounts just under an approval limit. It needs a much larger list to be reliable.

Are negative numbers and decimals handled?

Yes. The sign is ignored and the first nonzero digit is used, so 0.0042 counts as a 4 and -1,234.50 counts as a 1.

Why are zeros skipped?

A zero has no first significant digit, so it cannot be counted. If many of your amounts are zero, consider whether the list is the right data to test.