The Fabricated Number Detector, Explained
Read this to understand why invented numbers fail digit-level tests, how the χ² last-digit test actually works, and how to tell a real fraud lead from an honest false alarm.
What it does and one hook
People are bad at faking numbers. Ask a hundred people to write down a "random" two-digit number and far more than 10% pick something ending in 7. Very few pick a double like 44 or 88. Almost nobody writes 30 or 50, because those feel too tidy to be random, even though in real data round endings are common.
Genuine measured data does not share these habits. When you record 400 expense amounts to the cent, or 400 lab readings to three decimals, the last digit carries almost no information and lands roughly uniformly: each of 0 through 9 appears about 10% of the time. That regularity is the lever. This tool runs the digit-level tests auditors use: a χ² test of last-digit uniformity, a second-digit Benford check, a repeated-digit test, a round-number test, and a duplicate scan. Each returns a plain verdict.
The single most useful test is last-digit uniformity. First-digit patterns follow Benford's Law and get their own treatment; this page is mostly about the digits humans mangle when they invent, which are the last ones.
When to use it, and when not
Use it on numbers a person could plausibly have made up: reimbursement claims, hand-entered survey figures, manually logged measurements, invoice totals. You want values recorded to enough precision that the last digit is essentially noise. Amounts to the cent work well. Counts of people do not, because there is no meaningful last digit to test.
Do not use it on data that is round for honest reasons. Retail prices ending in .99, instruments that report in steps of 5, quantities sold in dozens, salaries negotiated to the nearest thousand: all of these fail digit uniformity while being perfectly genuine. A failed test is a lead, not a verdict.
You also need volume. Below about 50 numbers, only crude fabrication shows. The tool states how much statistical power you have so you do not over-read a result from 22 rows.
The last-digit χ² test
Pull the final digit off every number and count how often each of the ten digits appears. Under the null hypothesis of honest, high-precision data, each digit should show up with probability 1/10. Compare the observed counts to that expectation with Pearson's chi-squared statistic.
Here O_d is the observed count of numbers ending in digit d, and E_d = n / 10 is the expected count if the last digit were uniform, where n is the total count of numbers. Each term measures how far one digit's tally strays from expectation, scaled by that expectation so common and rare digits are weighed fairly.
With ten categories and one constraint (the counts sum to n), the statistic has 9 degrees of freedom. The mean of a \chi^2 distribution equals its degrees of freedom, so honest data should land near \chi^2 \approx 9. The 5% critical value for 9 degrees of freedom is 16.92. Above that, you reject uniformity at the 5% level.
A rough rule: for a clean pass you want each digit's expected count E_d = n/10 to be at least 5, which means n \ge 50. That is the same threshold as the power warning.
A worked example on the demo data
Reproducing the last-digit verdict
Click the demo button and you load a set of numbers whose last digits are deliberately lopsided, the way invented data looks. Suppose you have n = 200 numbers and the last digits fall like this: the digit 7 is overused, doubles are avoided, and 0 and 5 are underused because the faker was trying to look "random".
| Digit | Observed | Expected | (O−E)²/E |
|---|---|---|---|
| 0 | 8 | 20 | 7.20 |
| 1 | 19 | 20 | 0.05 |
| 2 | 24 | 20 | 0.80 |
| 3 | 27 | 20 | 2.45 |
| 4 | 18 | 20 | 0.20 |
| 5 | 9 | 20 | 6.05 |
| 6 | 21 | 20 | 0.05 |
| 7 | 44 | 20 | 28.80 |
| 8 | 16 | 20 | 0.80 |
| 9 | 14 | 20 | 1.80 |
- Confirm the counts sum to 200:
8+19+24+27+18+9+21+44+16+14 = 200. - Each expected count is E_d = 200/10 = 20.
- Add the last column:
7.20 + 0.05 + 0.80 + 2.45 + 0.20 + 6.05 + 0.05 + 28.80 + 0.80 + 1.80 = 48.20. - Compare \chi^2 = 48.2 against the critical value
16.92for 9 degrees of freedom. - Since
48.2is far above16.92, reject uniformity. The p-value is about0.0000002.
The single digit 7 contributes 28.8 of the total 48.2, almost 60% of it. That is the classic fingerprint of a human faker reaching for a lucky-feeling digit.
Reading the other four tests
The last-digit χ² is the headline, but four more checks add context.
- Second-digit Benford
- Benford's Law predicts a specific, decreasing frequency for the second digit: digit 0 appears about 12.0% of the time, digit 9 about 8.5%. Natural multi-scale data (populations, revenues, river lengths) follows it. A large deviation, tested with its own χ² on 9 degrees of freedom, suggests tampering or a non-Benford source.
- Repeated-digit test
- Counts how often numbers end in doubles like 11, 22, 44. Under uniform pairs of digits, doubles make up 10% of two-digit endings (10 doubles out of 100 combinations). Fakers produce far fewer because doubles do not feel random.
- Round-number test
- Counts values ending in 0, 00 or .00 and compares against what uniformity predicts. Too many round endings points to estimates rather than measurements. Genuine business data can trip this honestly, so read it beside the context.
- Duplicate scan
- Flags exact repeats. One person entering the same "typical" figure many times, or copy-pasting a claim, shows up as an implausible cluster of identical values.
Each test reports a verdict with your available power. Treat agreement across tests as stronger evidence: last-digit spikes plus a duplicate cluster plus too few doubles is a much better lead than any one flag alone.
Explore how one favourite digit breaks uniformity
Common mistakes
The fastest way to embarrass yourself is to run this on the wrong kind of column. Watch for four traps.
Prices ending in .99, instruments quantized to steps of 5, and figures rounded to the nearest 100 will all fail the round-number and last-digit tests for honest reasons. Check the data's precision before you call it fraud.
First, low count. With n = 30, each expected count is only 3, below the rule-of-thumb minimum of 5, and the χ² approximation is unreliable. Second, mixed units or currencies in one column, which scrambles the last digit for reasons unrelated to honesty. Third, testing a column that was itself rounded during export from a spreadsheet: the rounding, not the source, produces the pattern. Fourth, treating a single failed test as proof. It is a lead. Follow it with the record-level detail before you accuse anyone.
Related tools on this site
Get the column ready before you test it. Turn a spreadsheet into clean CSV with the Excel → CSV Converter, then inspect, sort and extract the one numeric column with the CSV Viewer & Editor. If you want to slice the data by department or vendor first, the Pivot Table Maker or the SQL Playground let you group and filter without a spreadsheet. For first-digit work, pair this with dedicated Benford analysis, and if you plan to share the flagged rows, strip identities first with the Data Anonymizer.
Frequently asked questions
How many numbers do I need for a reliable result?
Aim for at least 50 so each digit's expected count reaches 5. At 200 the tests are comfortable. Below 50, only gross fabrication shows, and the tool tells you your power is limited.
My honest data failed the round-number test. Is it fraud?
Probably not. Rounded prices, negotiated salaries and quantized instruments all produce excess round endings. A failed test is a reason to look closer, not a conclusion.
What χ² value counts as a failure?
For the last-digit test with 9 degrees of freedom, the 5% critical value is 16.92. Honest data averages near 9. The worked example scored 48.2, which fails decisively.
Why is the digit 7 so often the culprit?
When people try to seem random they favour 7 and 3 and avoid 0 and 5, which feel too neat. Real measurements have no such preference, so a spike at 7 is a strong tell.
Does anything leave my browser?
No. The tests run entirely on your device, so your files and numbers never get uploaded.