, ,

Benford’s Law in Practice: When Digit Analysis Works and When It Misleads

Benford’s law predicts how often each digit appears first in many naturally occurring sets of numbers: a 1 leads about 30.1 percent of the time and a 9 only about 4.6 percent. Auditors use it because invented numbers, amounts steered under approval limits, duplicated payments and processing errors all disturb that pattern. It works on data that span several orders of magnitude without built-in limits, such as payments or expense claims. It does not work on assigned numbers, set prices or bounded data, and a deviation is a lead to investigate, never proof of anything.

Digit analysis has a reputation problem in both directions. Some auditors treat a Benford chart as a fraud detector and present a deviation as a finding. Others dismiss the technique after running it on the wrong data and getting nonsense. Used properly it is a fast, cheap screen that points the auditor to specific amounts worth a closer look, and it is most useful at a level of detail most people never reach: the first two digits.

This guide explains the law and why it holds, which data conform, the tests that matter, how to measure conformity with z-statistics and Mark Nigrini’s mean absolute deviation thresholds, how large a spike has to be in files of different sizes, how to run the analysis in a spreadsheet or with the complete script provided, what Benford cannot detect, the follow-up that turns a spike into evidence, and how to write up the result. The worked example finds a cluster of expense claims sitting just under a receipt threshold.

In this guide

The law and why it holds

The pattern was first noticed by the astronomer Simon Newcomb in 1881 and is named after Frank Benford, a physicist at General Electric who, as Nigrini’s account in the Journal of Accountancy describes, noticed that the early pages of his logarithm tables were more worn than the later ones and went on to test 20 lists of numbers with 20,229 observations. The expected proportion of numbers with first digit d is log10(1 + 1/d).

Digit1234567890
First digit30.1%17.6%12.5%9.7%7.9%6.7%5.8%5.1%4.6%—
Second digit11.4%10.9%10.4%10.0%9.7%9.3%9.0%8.8%8.5%12.0%

Numbers beginning 1, 2 or 3 make up 60.2 percent of a conforming set. The second digit is much flatter, falling from 12.0 percent for zero to 8.5 percent for nine, and by the third digit the distribution is close to uniform. The expected proportion for any first-two-digit combination from 10 to 99 follows the same formula, from 4.14 percent for 10 down to 0.44 percent for 99.

An intuition helps. A fund growing steadily from $1 million spends a long time with a leading 1, until it doubles to $2 million; it then passes through the 2s, 3s and 4s faster, and through the 9s fastest of all before reaching $10 million and starting again at 1. Amounts that arise from growth, multiplication and the combination of many independent factors behave the same way. Roger Pinkham showed in 1961 that the law is scale invariant: multiply a conforming data set by any constant, such as an exchange rate, and it still conforms. That is why it applies to financial data in any currency.

Which data conform, and which do not

The law holds for numbers that describe the size of similar things, span several orders of magnitude and have no built-in minimum or maximum. It fails for numbers that are assigned, constrained or chosen by people for reasons of their own. Running the tests on the wrong data is the most common way to get a meaningless result.

Likely to conformUnlikely to conform
Vendor payments and invoice amountsAssigned numbers: invoice numbers, account numbers, employee IDs, postal codes
Expense claims across many categoriesAmounts with a built-in limit, such as a fixed per diem or a capped allowance
Sales transactions and customer balancesPrices set at psychological points, such as $9.99 or $49
Journal entry amountsHourly wage rates or other values within a narrow band
Inventory values and quantitiesFixed fees and subscriptions charged at the same amount to everyone
Populations of a few thousand items or moreVery small populations, where noise swamps any pattern

Nigrini’s examples of non-conforming data include Social Security numbers, zip codes and bank account numbers as assigned numbers, and deductible retirement contributions and hourly wage rates as data with built-in limits. Size matters too, most of all for the first-two digits test, where each of 90 combinations needs enough records to measure: in a file of 1,000 records the expected count is about 41 for combination 10 and about 4 for combination 99. The section on how large a spike has to be shows what each file size can reveal. A population that mixes conforming and non-conforming parts, such as payments that include a large block of identical monthly fees, should be split and the non-conforming part analyzed by other means.

The tests that matter

TestWhat it comparesWhat it tends to find
First digitFrequency of 1 to 9 as the leading digitA high-level check of whether the data behave as expected; too coarse to point to specific items
Second digitFrequency of 0 to 9 in the second positionRounding, such as an excess of zeros from estimates
First two digitsFrequency of each combination from 10 to 99Specific amounts that recur: approval thresholds, receipt limits, standard charges
Last two digitsFrequency of each ending from 00 to 99Invented numbers and excessive rounding
Number duplicationThe most frequent exact amountsDuplicate payments, recurring round sums, batch errors
Relative size factorThe largest amount in a group divided by the second largestDecimal-point and keying errors within a vendor or account
Same, same, same / same, same, differentExact matches, or matches on all but one fieldDuplicates, and the same invoice paid to two vendors

For auditors the first-two digits test does most of the work. Nigrini’s 1999 article gives examples: a spike at 24.50 in travel claims, just under a $25 voucher requirement; spikes at 28 and 29 for managers with a $3,000 purchasing limit; and a spike at 49 in credit card write-offs that traced to one officer writing off friends’ balances just under a $5,000 limit. Each is invisible in the first-digit test and obvious in the first two digits. The last three tests in the table, which the same article describes, go beyond digit frequencies and are worth running alongside them.

Measuring conformity

Two measures are used together: one for each individual digit or combination, and one for the data set as a whole.

For each digit, a z-statistic shows whether the actual proportion differs from the expected proportion by more than chance would explain: z = (|actual − expected| − 1/(2N)) ÷ √(expected × (1 − expected) ÷ N), where N is the number of records and the 1/(2N) term is a continuity correction, used only when it is smaller than the difference itself. A z above 1.96 is significant at the 5 percent level and above 2.57 at 1 percent. With large data sets, almost every digit becomes “significant”, which is why the z-statistic is read alongside the size of the difference.

For the data set as a whole, the chi-square test suffers from the same problem in a stronger form: with tens of thousands of records it rejects conformity for differences too small to matter. Nigrini proposed the mean absolute deviation (MAD) instead: the average of the absolute differences between actual and expected proportions across all digits. It does not grow with the number of records, and his 2012 book sets thresholds for it:

ConformityFirst digitSecond digitFirst two digits
Close conformity0.000 to 0.0060.000 to 0.0080.0000 to 0.0012
Acceptable conformity0.006 to 0.0120.008 to 0.0100.0012 to 0.0018
Marginally acceptable0.012 to 0.0150.010 to 0.0120.0018 to 0.0022
NonconformityAbove 0.015Above 0.012Above 0.0022

The thresholds are empirical, drawn from Nigrini’s experience with many data sets, and later statistical work has debated them. Treat them as a guide to whether the data set behaves broadly as expected, and remember the point the worked example makes: a data set can sit inside “acceptable conformity” overall while a handful of combinations carry exactly the problem you are looking for.

How large a spike has to be

The z-statistic depends on the size of the file as much as on the size of the spike, so the same z means different things in different files. The table shows, for combination 70 (expected in 0.616 percent of records), how many records above the expected count are needed to reach each significance level.

Records in the fileExpected count for 70Extra records for a z of 1.96Extra records for a z of 2.57Extra at 2.57 as a share of expected
2,0001281081%
5,00031121549%
16,00099202626%
50,000308354615%
100,000616496511%

Three reading rules follow from the arithmetic.

  • A small file shows only large distortions. In 2,000 records, combination 70 has to hold almost twice its expected count before the z-statistic reaches 2.57. For a small population, list the most frequent exact amounts and the amounts just under each known limit directly; that needs no distribution and works on a file of any size.
  • A large file flags small ones. In 100,000 records an excess of 65 items, about a tenth above expectation, is statistically significant. Whether it is worth an auditor’s time depends on the count and value of the records behind it, so rank by excess count as well as by z, and decide in advance how many extra records make a spike worth a listing.
  • Ninety tests produce some false alarms. The first-two digits test compares 90 combinations at once. In 2,000 simulated files of 16,000 records that conform to the law, run for this guide, an average of four combinations per file exceeded 1.96, and 55 percent of the files had at least one above 2.57. A lone z of 2.2 is what chance looks like. What chance very rarely produces is a z several times larger than the rest, or a run of neighboring combinations that are all high next to a run that are all low.

The worked example below shows both signs: combination 70 holds 198 claims against 99 expected, an excess of 99 records where 26 would have reached a z of 2.57, and the five combinations under the threshold are all high while the five above it are all low.

Running the analysis

  1. Define the population. One kind of transaction, one period, reconciled to the ledger. Analyze credits separately from debits, and set aside amounts below $10 for the first-two digits test, since they have only one digit before the decimal point.
  2. Extract the digits. In Excel, for a positive amount in A2, the first digit is =INT(A2/10^INT(LOG10(A2))) and the first two digits, for amounts of 10 or more, are =INT(A2/10^(INT(LOG10(A2))-1)). Count each value with COUNTIF.
  3. Compute expected proportions with =LOG10(1+1/d) for each digit or combination, and the z-statistic and MAD as above.
  4. Chart actual against expected. Spikes above the expected line are where the work is.
  5. Rank the combinations by z and by excess count. Look at the top ten, not just the first.
  6. Drill down. List the records behind each spike and group them by person, vendor, account or merchant.

Audit analytics packages run these tests directly, and a short script does the same job reproducibly; the guide to SQL for internal auditors covers the queries, and the guide to documenting analytics as audit evidence covers keeping them with the workpapers. In Python, the first two digits of an amount of $10 or more are int(str(round(x * 100))[:2]), which works in whole cents and so keeps every digit of a large amount; the next section gives a complete script.

A complete script for the first-two digits test

The steps above fit in a short script that needs nothing beyond a standard Python installation. It reads one column of amounts from a CSV file, counts the first-two digit combinations, and prints the mean absolute deviation and the ten combinations with the highest z-statistics. Run on the data behind the worked example below, it produces the figures quoted there.

import csv
from collections import Counter
from math import log10, sqrt

# Read one column of positive amounts from a CSV file
with open("claims.csv", newline="") as f:
    amounts = [float(row["amount"]) for row in csv.DictReader(f)]
amounts = [a for a in amounts if a >= 10]   # two digits before the decimal point

def first_two(x):
    cents = round(x * 100)                      # 72.35 becomes 7235
    return int(str(cents)[:2])                # and 7235 gives 72

n = len(amounts)
actual = Counter(first_two(a) for a in amounts)

rows = []
for d in range(10, 100):
    expected = log10(1 + 1 / d)
    observed = actual[d] / n
    diff = abs(observed - expected)
    if diff > 1 / (2 * n):                      # continuity correction
        diff -= 1 / (2 * n)
    z = diff / sqrt(expected * (1 - expected) / n)
    rows.append((z, d, actual[d], round(expected * n), observed > expected))

mad = sum(abs(actual[d] / n - log10(1 + 1 / d)) for d in range(10, 100)) / 90
print(f"Records: {n}   MAD: {mad:.5f}")
for z, d, count, exp_count, above in sorted(rows, reverse=True)[:10]:
    print(d, count, exp_count, f"{z:.2f}", "above" if above else "below")

Three details are worth keeping when adapting it. The digits are taken from the amount in whole cents, which keeps every digit of a large amount such as $199,999.99 and avoids the floating-point errors that formulas built on logarithms and division can produce. The continuity correction is applied only when it is smaller than the difference, as in the formula above. And the output is ranked by z-statistic but also shows the counts, because with large files a high z can sit on a difference too small to matter. Save the script, the input file and the output together, so that the test can be repeated.

Worked example: 16,000 expense claims

This example is illustrative: the organization, its people and its figures are invented (how the examples are built).

An auditor runs digit tests on a year of expense claims: 16,000 claims between $10.01 and $6,181.87, spread across travel, meals, supplies and training. Policy requires an itemized receipt for any claim of $75 or more. The first-digit test shows a MAD of 0.0113, inside Nigrini’s acceptable band, with more 7s and fewer 8s and 9s than expected. Nothing there points to a specific amount.

The first-two digits test has a MAD of 0.00157, also acceptable overall. But ranked by z-statistic, five combinations stand far above the rest:

First two digitsActual countExpected countz-statisticDirection
68991010.19Below
69921000.75Below
701989910.00Above
711969710.00Above
721949610.00Above
731949510.21Above
74169937.81Above
7566922.67Below
7648914.45Below
7761902.98Below
7859893.09Below
7955873.42Below

Combinations 70 to 74 hold 951 claims against 480 expected, and 75 to 79 hold 289 against 449. The shape is the signature of amounts being moved from just above a threshold to just below it. Drilling down, 914 of the 951 are claims between $70.00 and $74.99, the band immediately under the receipt requirement; the rest are larger amounts that happen to share the same first two digits.

The digit test has done its job, which is to point. It has not shown that any claim is improper. The auditor now groups the 914 claims by claimant and finds that 557 of them, 61 percent, come from 40 of the 1,140 claimants. A sample of those claims is compared with card statements and merchant records: some are genuine meals that cost $72; others are single purchases that card data shows were split across two days to stay under the limit. The receipt threshold becomes a finding on policy design and monitoring, the split purchases go through the organization’s investigation route, and the report says precisely what the digit test showed and what the follow-up proved.

Two further tests: summation and second-order

Nigrini’s Forensic Analytics adds two tests that do not depend on the data conforming to the law. Both use the same digit extraction, so they cost little to add to the same file.

TestWhat it computesWhat it is for
SummationThe total value of the records in each first-two digit combination, where the usual test counts themFinding combinations in which a few very large amounts, or one amount repeated, carry an outsized share of the money
Second-orderThe digit frequencies of the differences between neighboring amounts, once the file is sorted from smallest to largestChecking the integrity of the data. The paper that introduced the test reports that it detected errors in data downloads, rounded data, data generated by statistical procedures and data in the wrong order

Reading the summation test. In data that follow the law, the sums for the 90 combinations are expected to be about equal, so each would hold about 1.11 percent of the total. On the 16,000 claims above the sums are far from equal: combination 10 holds 4.56 percent of the $2,234,499 total, and just over half of that comes from 50 claims between $1,000 and $1,099. Here that is a feature of the data and not a problem, and it shows how the test is read: a high share is a prompt to list the largest records in the combination, and the listing is the result. Statisticians who have studied the property make the same point, that the size of a spike cannot be judged from the chart alone and its origin is found only by inspecting the records.

Reading the second-order test. Amounts held to the cent need care. On the same claims, 85 percent of the non-zero differences fall on combinations 10, 20 and so on up to 90, against 12 percent under the law. The reason is arithmetic: 16,000 amounts packed between $10 and $6,200 sit a few cents from their neighbors, and a difference of 1 to 9 cents has a single significant digit, which the test reads as 10, 20 and so on. Those spikes say that the data are discrete and nothing more. What deserves attention is a pattern that the make-up of the file does not explain, such as a block of amounts rounded to whole dollars in a file that is otherwise to the cent, or a result that changes from one period’s extract to the next.

What Benford cannot detect

Digit analysis looks for numbers that were changed or invented in ways that disturb the distribution. Many frauds do neither, and research on applying Benford to accounting data, including Durtschi, Hillison and Pacini’s paper on its effective use in fraud detection, stresses where auditors should exercise caution. It will not find:

  • Transactions that were never recorded. Skimmed cash and omitted liabilities leave nothing to analyze.
  • Fraud using genuine amounts. A fictitious vendor billing realistic amounts, or a kickback built into a real invoice, conforms perfectly.
  • A small scheme in a large population. Twenty fraudulent invoices among 50,000 will not shift any digit measurably: even with all twenty on a single first-two digit combination, that combination’s z-statistic rises by less than 1.4.
  • Duplicates of ordinary amounts. A second payment of a typical invoice adds one more item to an unremarkable combination; duplicate tests find these, digit tests do not.
  • Collusion. When the people approving and recording agree, the amounts can look exactly as they should.

Deviations also have innocent causes: standard prices, recurring fees, tax rates, rounding by policy, or thresholds that change genuine behavior. A conforming result is weak comfort and a non-conforming one is a question, which is why digit tests sit alongside the duplicate, relationship and timing tests in the guide to fraud data analytics.

From spike to evidence

StepWhat to doWhat to record
1. IsolateList every record behind the spikeThe combination, counts and z-statistic
2. GroupSort by person, vendor, account, merchant and dateWhere the excess concentrates
3. ExplainLook for a business reason: a price point, a fee, a policy limitExplanations found and how they were checked
4. TestExamine a selection of the unexplained records against source evidenceResults item by item
5. ConcludeReport what the evidence shows, not what the chart suggestsFindings, referrals and the limits of the test

Keep the language neutral throughout: “claims between $70.00 and $74.99” rather than “suspicious claims”. If the follow-up suggests wrongdoing, stop and follow the protocol in the guide to the first 48 hours. For selecting records to test in step 4, the guide to targeted and random sampling for fraud detection explains how to keep a targeted selection separate from any projection.

Writing up the result

A digit test is evidence only if another auditor can repeat it and see what it did and did not show. The workpaper needs seven entries, shown here with the figures from the worked example.

EntrySample wording
Population16,000 expense claims for the year, $2,234,499 in total, agreed to the expense ledger
ExclusionsNone. The smallest claim is $10.01, so every claim has two digits before the decimal point
TestFirst-two digits against the expected proportions. Script, input file and output are filed with this workpaper
Overall measureMean absolute deviation 0.00157, acceptable conformity under Nigrini’s thresholds
Combinations followed up70 to 74 hold 951 claims against 480 expected, with z-statistics from 7.81 to 10.21. 75 to 79 hold 289 against 449
Follow-up914 of the 951 claims are between $70.00 and $74.99. 557 of them were submitted by 40 of the 1,140 claimants. 60 of the 557 were compared with card statements and merchant records; results by item are in the testing workpaper
Conclusion and limitsClaims are concentrated immediately below the $75 receipt threshold. The digit test does not show that any claim is improper; the findings rest on the item testing

Two habits keep an entry like this defensible. State the excess in records as well as the z-statistic, because a reader can weigh 471 extra claims more easily than a z of 10. And describe what the records are, not what they might mean: the conclusion above says where the claims sit and leaves the question of why to the item testing.

On the CIA exam

Digit analysis belongs to Part 2 (Internal Audit Engagement) of the 2025 CIA syllabus, in Domain B, Information Gathering, Analysis, and Evaluation, where topic B5 covers analytical review techniques and topic B3 covers technology options including continuous monitoring. It also supports Part 1, Domain D, topic D4, on controls that prevent and detect fraud. The ideas worth knowing: which data conform and which do not, that the first-two digits test points to specific amounts, and that a deviation is a reason to investigate rather than evidence of fraud. The CIA exam hub maps every domain and the free practice questions test them.

Common mistakes

  • Running it on assigned or bounded numbers. Invoice numbers and capped allowances will never conform.
  • Stopping at the first-digit test. It is too coarse to point to anything specific.
  • Reading the overall measure only. Acceptable conformity overall can hide the spike that matters.
  • Using chi-square on large files. It flags trivial differences; use MAD and look at the size of each deviation.
  • Mixing debits and credits, or populations. Split them before testing.
  • Reporting a deviation as a finding. The finding is what the follow-up proves.
  • Treating conformity as clearance. Many schemes leave the digits untouched.

This guide is general and educational; it is not professional advice for a specific engagement.

Questions readers ask

What is Benford’s law in auditing?

The observation that in many naturally occurring data sets the first digit is 1 about 30.1 percent of the time, falling to about 4.6 percent for 9. Auditors compare transaction data with these expected frequencies to find amounts that recur unnaturally, such as amounts just under approval limits, which then get investigated.

What data does Benford’s law work on?

Numbers describing the size of similar things, spanning several orders of magnitude, with no built-in minimum or maximum, in populations large enough to measure: payments, invoices, sales and expense claims. It does not work on assigned numbers, set prices or values within a narrow band.

Which Benford test is most useful for auditors?

The first-two digits test, which compares the frequency of each combination from 10 to 99 with its expected value. It identifies specific recurring amounts, such as claims clustered under a receipt threshold, that the first-digit test cannot see.

What is a good MAD value for Benford’s law?

Under Nigrini’s thresholds, a first-digit MAD below 0.006 indicates close conformity, 0.006 to 0.012 acceptable conformity, 0.012 to 0.015 marginal conformity, and above 0.015 nonconformity. For the first two digits, nonconformity begins above 0.0022.

Does a Benford deviation prove fraud?

No. Deviations have many innocent causes, including standard prices, recurring fees and genuine responses to policy thresholds. A deviation identifies records to examine; only evidence from that examination supports a finding.

Can I run Benford’s law in Excel?

Yes. Extract first digits with =INT(A2/10^INT(LOG10(A2))) and first two digits with =INT(A2/10^(INT(LOG10(A2))-1)), count them with COUNTIF, and compare with expected proportions from =LOG10(1+1/d).

How many records are needed for Benford’s law?

There is no fixed minimum, but file size decides what the test can show. In 2,000 records, combination 70 is expected about 12 times and needs about 10 extra records to reach a z-statistic of 2.57; in 100,000 records it is expected 616 times and 65 extra records are enough. For a small population, listing the most frequent exact amounts and the amounts just under known limits does the same job without depending on a distribution.

What are the summation and second-order tests?

The summation test adds up the value of the records in each first-two digit combination, where the usual test counts them, and points to combinations in which a few very large amounts carry an outsized share of the money. The second-order test looks at the digits of the differences between neighboring amounts in a sorted file and is used to check the integrity of the data. Neither depends on the data conforming to the law.

Sources

Published in November 2026 and checked against the sources below. How guides are sourced, checked and corrected is set out in the editorial standards. Expected frequencies, the spike-size table, the simulation of conforming files and the worked example’s statistics were computed for this guide, and the script was run on the worked example’s data.

Free PDF · 15 one-page cheat sheets

The Internal Audit Desk Reference, free by email.

GIAS 2024 on one page, the sample-size tables, the risk and control matrix, the five-C finding, the SOX deficiency ladder, the CIA exam at a glance, and nine more. Printable. Written by working auditors.

Free. Confirm your address once; the PDF link follows. Unsubscribe anytime.

Cover of The Internal Audit Desk Reference: fifteen one-page cheat sheets and templates (PDF)
Cover of The Internal Audit Desk Reference: fifteen one-page cheat sheets and templates (PDF)

Free PDF

The desk reference: 15 cheat sheets, one page each.

GIAS map, sample sizes, the RCM, the five-C finding, SOX deficiency ladder, CIA at a glance. Free, printable.

Confirm once; the PDF link follows. Unsubscribe anytime.

Comments

Leave a Reply