Digit Counter

Count the digits and numbers in your text. The digit counter shows how many times each digit from 0 to 9 appears, how many separate numbers there are, the sum of all digits and the largest number, and checks the first digits of your numbers against Benford’s law. It reads Arabic, Urdu and Hindi digits too.

  • Digits 0–9
  • Benford’s law check
  • Arabic, Urdu and Hindi digits
0 words · 0 characters
Stays on this device

Numbers in your text

Every number found is highlighted, so you can check what was counted.

  • Number

Your text appears here with the matches highlighted.

Count of each digit

How many times each digit from 0 to 9 appears, including any written in other scripts.

Digit counts appear here.

First digits and Benford’s law

The first digit of each number, next to the share Benford’s law predicts for large sets of real-world numbers like prices, populations and invoices.

First-digit counts appear here once your text has numbers.

How to count digits and numbers

Counting the digits in a text takes three steps.

  1. Paste your text

    A document, a price list, a spreadsheet column or a set of phone numbers. The counts update as you type.

  2. Choose the options

    Digits written in other scripts, such as ٣ (Arabic), ۳ (Urdu) and ३ (Hindi), are counted as 0–9 by default. Sort the digit table from 0 to 9 or by count.

  3. Check the results

    Each digit’s count and share, the first-digit table with Benford’s law, and every number highlighted in your text.

Example

“Call 0300-555-0199” has 11 digits in 3 numbers. The digit 0 appears 4 times, 5 three times and 9 twice.

Count digits in a sample

Digits vs numbers

A digit is a single symbol from 0 to 9. A number is a run of digits read together.

TextDigitsNumbers
202641
$1,249.5061 (commas and decimal points stay inside a number)
12/03/202683
0300-555-0199113
MP3 player11

Digits in other scripts

Many languages write the same ten digits with their own shapes. The digit counter reads them all as 0–9.

ScriptDigits 0 to 9Used for
Western (ASCII)0 1 2 3 4 5 6 7 8 9Most of the world
Arabic-Indic٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩Arabic in much of the Middle East
Eastern Arabic-Indic۰ ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹Persian and Urdu
Devanagari० १ २ ३ ४ ५ ६ ७ ८ ९Hindi, Marathi and Nepali
Fullwidth0 1 2 3 4 5 6 7 8 9Chinese, Japanese and Korean text

Untick the option to count only the Western digits 0–9; digits in other scripts are then shown separately.

Benford’s law: check a list of numbers

In many real-world data sets, small first digits are far more common than large ones. Benford’s law predicts how often each first digit appears.

First digitExpected shareFirst digitExpected share
130.1%66.7%
217.6%75.8%
312.5%85.1%
49.7%94.6%
57.9%

Benford’s law fits data that spans several orders of magnitude, such as prices, populations and invoice amounts. It doesn’t fit assigned numbers like phone numbers, or values in a narrow range like heights.

Method

The Benford’s law formula

The expected share of numbers starting with digit d is:

P(d) = log₁₀(1 + 1/d)

d
The first digit, from 1 to 9

First digit 1

log₁₀(1 + 1/1) = log₁₀(2)

30.1%

First digit 9

log₁₀(1 + 1/9) = log₁₀(1.111)

4.6%

Auditors compare real figures with this pattern: invented numbers tend to have first digits spread too evenly. A mismatch is a reason to look closer, not proof of fraud.

Digit counter FAQ

What is the difference between a digit and a number?

A digit is one symbol from 0 to 9. A number is made of one or more digits: 2026 is one number with four digits.

Does the digit counter count numbers inside words?

Yes. The 3 in “MP3” is a digit, and it’s counted as a number too.

Are decimals and thousands separators part of a number?

Yes. 1,249.50 is one number with six digits. The comma and full stop aren’t counted as digits.

Can it count Arabic or Urdu digits?

Yes. Arabic-Indic (٠–٩), Persian and Urdu (۰–۹), Devanagari (०–९) and other digit sets are counted as 0–9, and listed under “Other-script forms”.

What is the sum of digits?

All the digits added together: 2026 gives 2 + 0 + 2 + 6 = 10.

What is Benford’s law?

A pattern in many real-world data sets where about 30% of numbers start with 1 and fewer than 5% start with 9. It’s used to spot unusual data, such as made-up figures.

Is my text uploaded?

No. The digits are counted in your browser and nothing is sent anywhere.

Sources and references

  1. Benford’s law, Wikipedia
  2. Benford’s Law, AccountingTools
  3. Eastern Arabic numerals, Wikipedia