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
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 | Count | Share | Other-script forms |
|---|
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 | Numbers | Share | Benford’s law |
|---|
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.
-
Paste your text
A document, a price list, a spreadsheet column or a set of phone numbers. The counts update as you type.
-
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.
-
Check the results
Each digit’s count and share, the first-digit table with Benford’s law, and every number highlighted in your text.
“Call 0300-555-0199” has 11 digits in 3 numbers. The digit 0 appears 4 times, 5 three times and 9 twice.
Digits vs numbers
A digit is a single symbol from 0 to 9. A number is a run of digits read together.
| Text | Digits | Numbers |
|---|---|---|
| 2026 | 4 | 1 |
| $1,249.50 | 6 | 1 (commas and decimal points stay inside a number) |
| 12/03/2026 | 8 | 3 |
| 0300-555-0199 | 11 | 3 |
| MP3 player | 1 | 1 |
Digits in other scripts
Many languages write the same ten digits with their own shapes. The digit counter reads them all as 0–9.
| Script | Digits 0 to 9 | Used for |
|---|---|---|
| Western (ASCII) | 0 1 2 3 4 5 6 7 8 9 | Most of the world |
| Arabic-Indic | ٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ | Arabic in much of the Middle East |
| Eastern Arabic-Indic | ۰ ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ | Persian and Urdu |
| Devanagari | ० १ २ ३ ४ ५ ६ ७ ८ ९ | Hindi, Marathi and Nepali |
| Fullwidth | 0 1 2 3 4 5 6 7 8 9 | Chinese, 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 digit | Expected share | First digit | Expected share |
|---|---|---|---|
| 1 | 30.1% | 6 | 6.7% |
| 2 | 17.6% | 7 | 5.8% |
| 3 | 12.5% | 8 | 5.1% |
| 4 | 9.7% | 9 | 4.6% |
| 5 | 7.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.
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
- Benford’s law, Wikipedia
- Benford’s Law, AccountingTools
- Eastern Arabic numerals, Wikipedia
More text analysis tools
- Letters Letter Counter Count only the letters in a text: no spaces, numbers or punctuation. Open tool
- #@% Symbol Counter Count symbols, punctuation and special characters, each with its name and code. Open tool
- Find Specific Character Counter Count how many times a letter, symbol, emoji or space appears in text. Open tool
- Distinct Unique Character Counter List every distinct character with its Unicode code point, and check for pangrams. Open tool