Benford's law in audit: formula, tests and a worked example
Benford's law says that in many sets of real-world amounts the first digit is not evenly spread: 30.1% start with 1 and only 4.6% with 9, following P(d) = log10(1 + 1/d). In an audit, Benford analysis compares a client's amounts with that distribution and flags the digits that carry more amounts than expected, which you then investigate item by item.
Updated 10 November 2026
What Benford's law is and why it works
Take every supplier invoice for a year and look only at the first figure of each amount. You will not find 11% of each digit from 1 to 9. You will find far more ones than twos, more twos than threes, and so on down to 9. Simon Newcomb noticed it in 1881 and Frank Benford tested it in 1938 on more than 20,000 numbers from very different sources. Since the 1990s, largely through Mark Nigrini's work, it has been a standard test in auditing and forensic accounting.
The test itself is simple: work out what share of the amounts starts with each digit, compare it with the share the law predicts, and see where they part. An excess of amounts starting with 4 or 9 is not a fraud. It is a question: what is in there?
Benford's law formula
P(d) = log10(1 + 1/d), for d = 1, 2, …, 9
The probability that the first digit is 1 is log10(2) = 0.30103; for 9 it is log10(10/9) = 0.04576. The nine values add up to 1. For the second digit, which can be 0, you add over every possible first digit: P(d2) = Σ log10(1 + 1/(10·d1 + d2)), with d1 from 1 to 9.
| Digit | First digit | Second digit |
|---|---|---|
| 0 | — | 11.97 % |
| 1 | 30.10 % | 11.39 % |
| 2 | 17.61 % | 10.88 % |
| 3 | 12.49 % | 10.43 % |
| 4 | 9.69 % | 10.03 % |
| 5 | 7.92 % | 9.67 % |
| 6 | 6.69 % | 9.34 % |
| 7 | 5.80 % | 9.04 % |
| 8 | 5.12 % | 8.76 % |
| 9 | 4.58 % | 8.50 % |
Computed from log10(1 + 1/d). The second-digit column is for information: second digits are much closer to uniform (12.0% down to 8.5%) and tell you less.
Why it works
The most useful explanation for an auditor is the log scale. Amounts produced by multiplication (price times quantity, balance times interest rate, sales growing by a percentage each year) spread fairly evenly on a logarithmic scale across several orders of magnitude. On that scale the stretch from 1 to 2 takes up 30.1% of every decade (log 2 − log 1) and the stretch from 9 to 10 only 4.6% (log 10 − log 9). Hence all the ones.
It is also the only first-digit distribution that stays the same when you restate amounts from euros to dollars (multiply every amount by a constant), and Theodore Hill showed in 1995 that mixing data from many different distributions tends towards it. That is why a general ledger, mixing sales, purchases, payroll and payments, fits so well.
Benford's law in accounting and auditing
In a financial statement audit, Benford analysis is an analytical procedure over the whole population, not a test of details. It does three jobs:
- It shows where to look. A digit with a clear excess points at a specific group of amounts: payments just below an approval limit, a repeated amount, a supplier that always bills the same figure.
- It catches invented numbers. People who make up figures tend to spread digits too evenly or repeat favourite numbers. That is why Benford's law is used for fraud detection in expenses, refunds and manual journals.
- It feeds journal entry testing. In journal entry testing under ISA 240, a first-digit spike is one more criterion for choosing which entries to examine.
Forensic accountants use it the same way, with more tests chained together (first two digits, last digits, duplicate amounts) and with a specific person or supplier in view.
Which accounting data should follow Benford's law
Before running the test, ask whether the population should conform at all. If it should not, a deviation tells you nothing.
Usually conforms
- Sales and purchase invoices, payments and receipts for a full year.
- General ledger lines, and receivable or payable balances with many customers or suppliers.
- Inventory valuations by item (units times cost).
- In general, amounts spanning several orders of magnitude (tens to hundreds of thousands), with no set maximum or minimum, built from many independent transactions.
Does not conform, and that signals nothing
- Assigned numbers: invoice numbers, account codes, cheque numbers, phone numbers, postcodes. They are labels, not magnitudes.
- Prices and tariffs: price lists ending in .99, flat fees, rents or subscriptions that repeat every month.
- Data with thresholds: capped allowances, expenses below a no-receipt limit, orders with a minimum value. The threshold creates a spike by design.
- Narrow ranges: if every salary sits between 1,500 and 3,000, nearly all of them start with 1 or 2.
- Small populations: with a few hundred amounts the proportions swing a lot by chance. The 50-amount minimum in AuditSampler Pro is a technical floor, not a recommendation.
Analyse negative amounts (credit notes, reversals) separately from positive ones, and consider leaving out very small amounts, which carry little value and distort the digits.
Benford analysis tests: first digit, chi-square and MAD
First-digit test and z per digit
For each digit, the actual proportion is compared with the expected one using a z-statistic: z = (pactual − pBenford) ÷ √(pBenford × (1 − pBenford) ÷ n). At a 5% significance level, |z| > 1.96 flags the digit. Nigrini also subtracts a small continuity correction, 1/(2n), from the numerator; with thousands of amounts it hardly moves the result.
Chi-square
The chi-square test adds (observed − expected)² ÷ expected over the nine digits and compares it with a chi-square distribution with 8 degrees of freedom: the critical value is 15.51 at 5% and 20.09 at 1%. Its weakness is that it grows with the population. With the same proportions, ten times as many amounts gives ten times the statistic, so on large populations almost everything comes out as nonconforming.
MAD (mean absolute deviation)
MAD is the average of the absolute differences between actual and expected proportions over the nine digits. It does not depend on the number of records, which is why Nigrini proposes it as the main conformity measure, with these first-digit thresholds:
| First-digit MAD | Conclusion |
|---|---|
| Below 0.006 | Close conformity |
| 0.006 to 0.012 | Acceptable conformity |
| 0.012 to 0.015 | Marginally acceptable conformity |
| Above 0.015 | Nonconformity |
Source: M. J. Nigrini, Benford's Law: Applications for Forensic Accounting, Auditing, and Fraud Detection (Wiley, 2012). The AuditSampler Pro engine uses the same thresholds (anomaly/benford.py). The second-digit and first-two-digits tests have different thresholds.
Benford's law example on a journal
A fictional distributor's general journal for 2025: 6,000 lines, all positive, totalling 94,119,889.84. First-digit test results:
| First digit | Amounts | Expected | Actual | Benford | z |
|---|---|---|---|---|---|
| 1 | 1,840 | 1,806.2 | 30.67 % | 30.10 % | 0.95 |
| 2 | 988 | 1,056.5 | 16.47 % | 17.61 % | −2.32 |
| 3 | 756 | 749.6 | 12.60 % | 12.49 % | 0.25 |
| 4 | 577 | 581.5 | 9.62 % | 9.69 % | −0.19 |
| 5 | 490 | 475.1 | 8.17 % | 7.92 % | 0.71 |
| 6 | 375 | 401.7 | 6.25 % | 6.69 % | −1.38 |
| 7 | 343 | 348.0 | 5.72 % | 5.80 % | −0.27 |
| 8 | 283 | 306.9 | 4.72 % | 5.12 % | −1.40 |
| 9 | 348 | 274.5 | 5.80 % | 4.58 % | 4.54 |
- MAD: 0.0048. Below 0.006: close conformity. Taken as a whole, the journal looks normal.
- Chi-square: 29.00, p = 0.0003. Well above 15.51, so it rejects conformity. With 6,000 amounts that is to be expected: the same proportions on 600 amounts would give 2.90 (p = 0.94).
- Digit 9: 348 amounts against 274.5 expected, z = 4.54. The only clear excess. Of those 348 amounts, 264 sit between 9,000 and 9,999.99, and 149 between 9,500 and 9,999.99.
- Drill-down by user. Of the 149, 50 were posted by one purchasing officer: 7.1% of her 708 lines, against 1.5–2.4% for the other users with more than 800 lines. 45 of those 50 are invoices from just three suppliers, and her approval limit is 10,000. That is what to examine: invoices split or shaded to avoid a second signature.
- Check. Without those 50 lines the chi-square falls to 11.02 (p = 0.20), MAD to 0.0040, and digit 9 no longer stands out (z = 1.60).
Digit 2 is short in both runs (z = −2.32 and −2.03). A shortfall does not point at any items, and with nine tests at 5% one flag by chance is not unusual. Note it and move on. What MAD alone would have missed, the z per digit caught, so look at all three measures, not only the overall verdict.
Benford's law in Excel
With the amounts in column A (A2 to A6001, no zeros) the first-digit test takes ten minutes. Formulas use English function names; Spanish Excel names are in brackets.
- First digit in B2, filled down:
=INT(ABS(A2)/10^INT(LOG10(ABS(A2))))[ENTERO]. It also works for amounts below 1. If every amount is 1 or more,=VALUE(LEFT(A2,1))[VALOR,IZQUIERDA] is enough. - Digits and expected share: type 1 to 9 in D2:D10 and in E2
=LOG10(1+1/D2). - Actual count: in F2
=COUNTIF($B$2:$B$6001,D2)[CONTAR.SI], and the share in G2=F2/SUM($F$2:$F$10)[SUMA]. - Expected count and z: in H2
=E2*SUM($F$2:$F$10)and in I2=(G2-E2)/SQRT(E2*(1-E2)/SUM($F$2:$F$10))[RAIZ]. Flag digits with |z| > 1.96. - Chi-square: the p-value is
=CHISQ.TEST(F2:F10,H2:H10)[PRUEBA.CHICUAD], the statistic=SUMPRODUCT((F2:F10-H2:H10)^2/H2:H10)[SUMAPRODUCTO], and the 5% critical value=CHISQ.INV.RT(0.05,8)[INV.CHICUAD.CD]. - MAD:
=SUMPRODUCT(ABS(G2:G10-E2:E10))/9, compared with Nigrini's thresholds. - Chart: a column chart of G2:G10 with a line for E2:E10 is the Benford chart for the working paper.
Excel handles the arithmetic well. The hard part is the next step: filtering the amounts behind the flagged digit, grouping them by user, supplier or account, and documenting what you examined. For the rest of sampling in spreadsheets, see audit sampling in Excel.
What a spike means, and what it does not
Benford's law flags, it does not prove. A digit with excess amounts says that group differs from the rest. It may be fraud, but more often there is a business reason: a flat fee, a contract with equal instalments, a spending limit, or a type of transaction only one department handles.
- What to do with a spike: filter the amounts for that digit (better still, for the first two digits), sort them, look for repeats, and group them by user, supplier, account and date. If a cluster appears, select those items and examine them against their support.
- What not to do: conclude there is manipulation because the overall test fails, or that there is none because it passes. A fraud made of a few large items does not move the distribution of 6,000 amounts, and Benford cannot see amounts that were never recorded.
- How to document it: the population and its reconciliation to the ledger, filters applied, the digit table, MAD, chi-square and z, the items examined, and the conclusion. The test is not statistical sampling: items are selected on purpose and their results are not projected to the population.
Benford analysis in AuditSampler Pro
The anomaly detection module runs the first-digit test on the amount column you pick: actual and expected counts, z and p-value per digit at 5%, chi-square, and MAD against Nigrini's thresholds. It takes negative amounts at their absolute value and ignores zeros. It does not run second-digit or first-two-digits tests.
Frequently asked questions
What is Benford's law in simple terms?
In many sets of real amounts the first digit follows P(d) = log10(1 + 1/d): about 30.1% of amounts start with 1 and 4.6% with 9. It holds because amounts spanning several orders of magnitude are spread evenly on a log scale.
How is Benford's law used in an audit?
As an analytical procedure over the whole population: compare the share of amounts starting with each digit with the expected share, then filter, group and examine the amounts behind any digit with a clear excess.
Can Benford's law detect fraud?
It helps find it but does not prove it. Invented amounts, or amounts split to stay under an approval limit, often leave a spike on one digit. A spike can also have a business reason, and a fraud of a few items will not change the distribution.
What is the Benford's law formula?
P(d) = log10(1 + 1/d) for the first digit d from 1 to 9. For the second digit, P(d2) is the sum of log10(1 + 1/(10·d1 + d2)) over every first digit d1 from 1 to 9.
What MAD value means the data conform?
For the first digit, Nigrini's thresholds are: below 0.006 close conformity, 0.006 to 0.012 acceptable, 0.012 to 0.015 marginally acceptable, above 0.015 nonconformity.
How do I do Benford analysis in Excel?
Extract the first digit with =INT(ABS(A2)/10^INT(LOG10(ABS(A2)))), count each digit with COUNTIF, compute the expected share with =LOG10(1+1/d), then compare with CHISQ.TEST and with MAD (SUMPRODUCT of the absolute differences divided by 9).
- F. Benford, "The law of anomalous numbers", Proceedings of the American Philosophical Society 78(4), 1938
- S. Newcomb, "Note on the frequency of use of the different digits in natural numbers", American Journal of Mathematics 4, 1881
- T. P. Hill, "A statistical derivation of the significant-digit law", Statistical Science 10(4), 1995
- M. J. Nigrini, Benford's Law: Applications for Forensic Accounting, Auditing, and Fraud Detection, Wiley, 2012
- IAASB, ISA 240 The Auditor's Responsibilities Relating to Fraud in an Audit of Financial Statements
Run Benford on your own data
AuditSampler Pro imports a journal or any list of amounts and runs the first-digit test with z per digit, chi-square and MAD. Client data stays on your computer.