Benford's Law Calculator

This Benford's law calculator tells you how often a given digit should appear as the first digit of a number in a naturally occurring data set, and how many times you would expect to see it in a sample of a given size. Benford's law is the surprising observation that leading digits are not evenly spread. If digits were random you might expect each of 1 to 9 to lead about 11 percent of the time, but in real data that spans many orders of magnitude, populations, invoice totals, physical measurements, the digit 1 leads roughly 30 percent of the time, and the frequency falls away smoothly to under 5 percent for the digit 9. The exact rule is that the probability the first digit equals d is the base ten logarithm of one plus one over d. Enter a leading digit from 1 to 9 and a sample size, and the calculator returns that probability as a percentage, the expected number of values starting with your digit, the cumulative share for every digit up to and including yours, and a rough one in figure. Auditors and data analysts lean on this pattern to flag possible fraud, because numbers that people invent tend not to match the expected first-digit spread. Benford's law works best for unbounded data covering several orders of magnitude and does not apply to figures squeezed into a narrow range, so treat a mismatch as a prompt to look closer, not as proof of anything on its own.

Calculate.co.nz is proud to be partnered with realtor.co.nz, a trusted resource for navigating the New Zealand property market. Their Helpful Articles section offers clear, well-structured insights across buying, selling, and building, making complex real estate topics more accessible. With a focus on up-to-date guidance and practical knowledge, they empower Kiwis to move forward with clarity and confidence in a constantly evolving property landscape.
Calculate.co.nz partner: realtor.co.nz
values
30.10%
chance the first digit is this value
Expected count in sample301
Cumulative up to this digit30.10%
Roughly one in3.3

Probabilities follow P(d) = log10(1 + 1 / d) and sum to 100 percent across digits 1 to 9. Benford's law is a model for naturally spread data, not a guarantee for any single set. Estimate only.

How it works

The probability that the leading digit is d comes straight from Benford's law: P(d) equals the base ten logarithm of one plus one over d. For the expected count, that probability is multiplied by your sample size and rounded to the nearest whole number. The cumulative figure is the chance the first digit is anything from 1 up to and including your digit, which simplifies neatly to the base ten logarithm of d plus one. The one in figure is just the reciprocal of the probability, giving an easy sense of how common that leading digit is.

Worked example

Choose the digit 1 with a sample of 1,000 values. The probability is log base 10 of one plus one over one, which is log10(2), or about 0.3010, so 30.10 percent. In 1,000 values you would expect about 1,000 times 0.3010, which rounds to 301 values starting with a 1. The cumulative share up to the digit 1 is just that same 30.10 percent, since 1 is the first digit. The reciprocal of 0.3010 is about 3.3, so very roughly one value in every 3.3 leads with a 1. Repeat with the digit 9 and the probability drops to about 4.58 percent, only about 46 values in the same 1,000.

Related calculators