What is the probability that a number, picked at random from the real world, begins with the digit 1?
The instinctive answer is one in nine — roughly 11%. There are nine non-zero digits. If they are equally likely, each gets an equal share. This is the classical probability argument, and it feels airtight.
It is wrong. Spectacularly, verifiably, universally wrong.
In almost any large dataset drawn from the real world — populations of cities, lengths of rivers, prices, earthquake depths, company revenues — the leading digit is not uniformly distributed. The digit 1 appears as the first digit about 30% of the time. Not 11%. Nearly three times the naive expectation. The digit 9 appears less than 5% of the time. And this is not some quirk of one particular dataset or one particular unit of measurement. It holds for river lengths measured in miles and in kilometres. It holds for populations counted in 1938 and in 2022. It holds for stock prices, for the surface areas of lakes, for the distances between stars. The same curve, over and over, in data that has no business agreeing with each other.
It gets stranger. The law applies to the Fibonacci sequence — a string of integers generated by pure arithmetic with no connection to the physical world. It applies to powers of 2. It applies to the constants of physics. There is something almost unreasonable about it: a single logarithmic formula that describes the leading digit of almost every number humanity has ever measured, counted, or computed.
This is Benford’s Law. The classical probability intuition fails because real-world numbers do not come from a uniform distribution over the digits — they come from processes that span many orders of magnitude, and on a logarithmic scale, the space between 1 and 2 is much larger than the space between 8 and 9.
In this post
- 1See it live — the Fibonacci sequence demonstrates the law in real time
- 2Origins — from worn logarithm tables to 20,000 data points
- 3The mathematics — the formula, and why scale invariance explains it
- 4Applications — fraud detection, real-world cases, and popular culture
- 5The dataset explorer — testing the law ourselves across eight real datasets
- 6Verify it yourself — raw data, collection scripts, and replication instructions
See it live
The histogram is filling in from the Fibonacci sequence in real time. Watch where the bars settle: digit 1 claims about 30% of the total, digit 9 barely registers. The dashed curve is the theoretical prediction. The data follows it almost exactly.
That this holds for a pure mathematical sequence — with no real-world data involved — is the first hint that something deeper than empirical coincidence is going on.
Origins
The law has an unusual history — discovered twice, named after the second discoverer, and eventually proven rigorously only sixty years after the first observation.
1881. Simon Newcomb, a Canadian-American astronomer and mathematician, notices something odd about his book of logarithm tables. The first pages — covering numbers beginning with 1 — are noticeably more worn and soiled than the later pages. People are looking up numbers starting with 1 far more often than numbers starting with 9. He publishes a short paper in the American Journal of Mathematics titled “Note on the Frequency of Use of the Different Digits in Natural Numbers.” In it he states the probability rule:
“The law of probability of the occurrence of numbers is such that the mantissae of their logarithms are equally probable.”
This is the insight. On a logarithmic scale, the space between 1.0 and 2.0 is the same size as the space between 4.0 and 8.0. So a uniformly distributed random variable on the log scale produces exactly this first-digit distribution. Newcomb’s paper is essentially ignored.
1938. Frank Benford, a physicist at General Electric, independently notices the same phenomenon in logarithm tables and runs a systematic study. He collects 20,229 data points spanning 20 different categories: river surface areas, population counts, physical constants, street addresses, molecular weights, newspaper front pages. In category after category, the leading-digit distribution matches the same curve. He publishes “The Law of Anomalous Numbers” in the Proceedings of the American Philosophical Society. The law takes his name — despite Newcomb’s priority by 57 years.
1995. Theodore Hill proves the result rigorously. He shows that if you repeatedly sample from a variety of different distributions and pool the results, the aggregate first-digit distribution converges to Benford’s Law. This “random samples from random distributions” theorem explains why the law applies so broadly: real-world datasets are mixtures of many different underlying processes, and that mixture converges to Benford regardless of the individual components. The paper, “A Statistical Derivation of the Significant-Digit Law,” appeared in Statistical Science.
The mathematics
The formula is compact:
where is the first digit. Plugging in each value:
| Digit | Expected frequency |
|---|---|
| 1 | 30.1% |
| 2 | 17.6% |
| 3 | 12.5% |
| 4 | 9.7% |
| 5 | 7.9% |
| 6 | 6.7% |
| 7 | 5.8% |
| 8 | 5.1% |
| 9 | 4.6% |
These sum to exactly 100%. The formula says that the probability of leading digit is the fraction of the logarithmic number line occupied by numbers whose first digit is — the width of the interval on a log scale.
Why scale invariance explains it
Here is the key constraint. Any naturally occurring quantity — length, population, price — can be measured in different units. River lengths can be in kilometres or miles. Stock prices can be in dollars or yen. A first-digit distribution should not depend on your choice of units. If it did, your measuring system would affect the statistical pattern — which would be a strange property for a universal law to have.
The only first-digit distribution that is invariant under multiplication by any positive constant is the one given by the log formula above. This is not a coincidence — it is the defining property of the distribution. Benford’s Law is the unique fixed point of scale transformation.
Try it below. Drag the slider to multiply every number in a Fibonacci dataset by any factor from 0.001 to 1,000. The distribution on the right always matches the one on the left.
When the law doesn’t apply
The law requires data to span several orders of magnitude. Adult human heights (roughly 1.5m to 2.1m) span less than one order of magnitude — Benford’s Law does not apply. Mountain heights (roughly 100m to 8,849m) span nearly two orders — it does. A dataset confined to a narrow range, or one that is assigned rather than measured (phone numbers, ZIP codes, identity numbers), will not follow it. The law is a property of wide-ranging natural measurement, not of constructed data.
Applications
Fraud detection
When people fabricate financial numbers — inflated expense claims, invented transaction records, falsified accounting entries — they tend to make them look “random.” But human intuitions about randomness are badly calibrated. People avoid 1 as a leading digit (it feels too small, too obvious) and gravitate toward mid-range digits like 3, 5, and 7.
The result is a characteristic signature: the first-digit distribution of fabricated data is flatter and more uniform than Benford’s Law predicts. The deviation is measurable.
The left panel shows a distribution that follows Benford’s Law closely — the kind you would expect from real accounting records. The right panel shows what human-invented “random” numbers actually look like. The Benford curve (dashed) is identical in both panels. The gap on the right is not subtle.
Forensic accountants use this as a screening tool. A Benford-deviant dataset is not proof of fraud — there are legitimate reasons a dataset might not follow the law — but it is a signal worth investigating.
In the wild
2009 Iranian presidential election. Following the disputed re-election of Mahmoud Ahmadinejad, Walter Mebane, a political scientist at the University of Michigan, applied Benford’s Law to the officially reported vote totals. His analysis found that the second-digit distribution of reported vote counts deviated significantly from Benford’s prediction. The published article appeared in CHANCE in 2010; a working paper circulated in June 2009. A separate analysis by Roukema (2014) in the Journal of Applied Statistics found a first-digit anomaly in the same data. Benford analysis is suggestive, not conclusive — but it added statistical weight to the concerns raised by opposition groups.
Enron. Following the company’s 2001 bankruptcy, forensic accountants applied Benford analysis to Enron’s reported financial data. Mark Nigrini, whose work on Benford’s Law and financial fraud is collected in Forensic Analytics (Wiley, 2012), discusses the use of this technique in the context of accounting fraud investigation. Benford deviation is not proof of manipulation — the accounting irregularities at Enron were far more direct — but the approach illustrates how the law functions as a screening filter in forensic practice.
Greek national statistics. A 2011 paper by Rauch, Göttsche, Brähler, and Engel in the German Economic Review analysed macroeconomic data submitted by Eurozone members to Eurostat. Greek data showed the highest deviation from Benford’s Law of any member state, particularly in the years leading up to the 2009 revelation of Greece’s true deficit figures. The authors noted that Benford deviation is not proof of falsification, but the finding contributed to ongoing discussions of data integrity in European fiscal reporting.
In popular culture
Designated Survivor (Season 2, 2017–2018). The character Emily uses Benford’s Law to analyse reported election returns, identifying a deviation from the expected first-digit distribution as evidence that results were fabricated. The show’s depiction is accurate in its essentials: the method, the deviation, and the statistical argument are all presented correctly.
Numberphile. The YouTube channel produced a widely-viewed episode on Benford’s Law in 2013, covering the formula and several real-world applications. It remains one of the primary ways the broader public first encounters the concept.
Connected (Netflix, 2020). The documentary episode “Digits” covers Benford’s Law in full — its history, its mathematics, and its applications in fraud detection and election analysis. It remains the most accessible long-form treatment available.
The dataset explorer
The formula is convincing. The history is compelling. But the right response to a counter-intuitive claim is not to accept it — it is to check it.
So rather than trust the mathematics alone, let us apply it to real data ourselves. Eight datasets, drawn from separate domains with no connection to each other: population counts, economic figures, geographical measurements, and pure mathematical sequences. Each one was downloaded directly from its primary source — the World Bank API, the US Census Bureau, the Wikidata query service — processed with the same first-digit extraction, and measured against the Benford prediction.
The methodology is straightforward: take the first significant digit of every value in the dataset, count how often each digit 1 through 9 appears, and compare the resulting distribution to the Benford curve . The mean absolute deviation (MAD) measures the gap between observed and predicted frequency, averaged across all nine digits. A MAD below 0.006 is a close fit by forensic accounting standards; real-world data, which carries sampling biases and measurement noise, will naturally sit a little higher.
The computed sequences — Fibonacci and powers of 2 — achieve MAD scores below 0.002, fitting the curve almost exactly. The empirical datasets from the World Bank and Census Bureau, despite covering entirely different phenomena at entirely different scales, cluster in the same territory. The law is not a statistical curiosity of messy data. It is a mathematical truth that messy data keeps rediscovering.
Verify it yourself
Every number behind these charts is reproducible. Here is how to trace any of it back to its origin.
Per-dataset provenance. Each tab in the explorer has a how collected button in the caption bar. Clicking it opens a panel showing the exact API request or SPARQL query used to collect that dataset, and the timestamp of when the data was last fetched. The source ↗ link takes you directly to the primary source — the World Bank indicator page, the Census Bureau API endpoint, or a pre-loaded Wikidata query you can run yourself in the browser.
The raw values. Every dataset is stored as a plain CSV, one value per row — the unprocessed measurement before any first-digit extraction. There is no rounding, no normalisation, no aggregation beyond what the source API returns.
Re-running the collection. The collection script requires Node.js 18 or later and no additional dependencies beyond what the site already uses. Running it hits the live APIs, recomputes the first-digit distributions, and overwrites the CSV and JSON files with fresh data. The fetch timestamp in each ” how collected” panel updates to reflect when you ran it.
The computation. For each dataset the script does three things: request the raw values from the source, extract the first significant digit of each positive number using the formula , and compute the frequency of each digit 1 through 9. The MAD score is then , where is the observed frequency. That is the full pipeline.
Sources
- Newcomb, S. (1881). “Note on the Frequency of Use of the Different Digits in Natural Numbers.” American Journal of Mathematics, 4(1), 39–40. JSTOR
- Benford, F. (1938). “The Law of Anomalous Numbers.” Proceedings of the American Philosophical Society, 78(4), 551–572. JSTOR
- Hill, T. P. (1995). “A Statistical Derivation of the Significant-Digit Law.” Statistical Science, 10(4), 354–363. Project Euclid
- Mebane, W. R. Jr. (2010). “Fraud in the 2009 presidential election in Iran?” CHANCE, 23(1), 6–15. Springer · Working paper (June 2009)
- Roukema, B. F. (2014). “A first-digit anomaly in the 2009 Iranian presidential election.” Journal of Applied Statistics, 41(1), 164–177. arXiv
- Rauch, B., Göttsche, M., Brähler, G., & Engel, S. (2011). “Fact and Fiction in EU-Governmental Economic Data.” German Economic Review, 12(3), 243–255. De Gruyter
- Nigrini, M. J. (2012). Forensic Analytics: Methods and Techniques for Forensic Accounting Investigations. Wiley. Wiley
Dataset sources
- Fibonacci / Powers of 2 — mathematically computed using arbitrary-precision arithmetic (BigInt).
- Country Populations — World Bank, SP.POP.TOTL, 2022. data.worldbank.org
- US County Populations — US Census Bureau, 2020 Decennial Census, P1 total population table. census.gov
- Country GDPs — World Bank, NY.GDP.MKTP.CD (GDP current USD), 2022. data.worldbank.org
- Country Land Areas — World Bank, AG.LND.TOTL.K2 (land area km²), 2021. data.worldbank.org
- US City Populations — US Census Bureau, 2020 Decennial Census, all incorporated places. census.gov
- Mountain Peak Heights — Wikidata P2044 (elevation above sea level, m), mountain and volcanic peaks 500–9,000 m, n = 20,000. SPARQL query