Saved

Press the star next to a tool's name to save it.

All my tools

Digit Counter

Use this digit counter to find how many digits are in your text, how often each of 0 to 9 appears and how many groups of digits it holds, all in your browser.

Restored your last values ·

Only digit characters are counted; letters and symbols are ignored.

Everything is worked out in your browser. Nothing you type is sent anywhere.

Result

Your digit count will appear here.

Recent results

How many digits are in a phone number, an invoice, a block of data or a long paragraph full of figures? A digit counter answers that at once. Paste your text and the tool tells you how many digit characters it holds, how often each digit from 0 to 9 appears and how many separate numbers are written in it.

What the digit counter shows

After you press the button, the big number at the top is the total count of digits found. Underneath, a table breaks that total down: the digits 0 to 9, the digits from other scripts if you left that option on, the number of groups of digits, how many different digits were used and the total number of characters in the text. Below those rows you will see one line for every digit from 0 to 9, each with its count and its share of the ASCII digits found.

What counts as a digit

The decimal system needs ten digits, 0 to 9, which are the Western Arabic numerals used in base 10. [1] But many scripts have their own digit symbols. The Wikipedia article on numerical digits shows Eastern Arabic and Devanagari digits next to the Western ones. [1] Unicode gives all decimal digit characters the general category Nd, and the Wikipedia article on Unicode character properties says that all of these, and only these, have the numeric type of decimal. [2]

This digit counter therefore has two kinds of result. The ten ASCII digits are counted one by one in the table. If the option for other scripts is ticked, any other character in the Nd category is counted too and shown on its own row, then added into the grand total. Untick the option when you only want the familiar 0 to 9.

Groups of digits

The groups row counts runs of ASCII digits that are not interrupted by any other character. The text "Call 555-0199 or 42" has three groups: 555, 0199 and 42. A decimal number such as 3.14 counts as two groups because the dot breaks the run, and a number with thousands separators such as 1,250,000 counts as three. Treat the figure as a quick estimate of how many numbers appear, not a precise number count.

Worked example

Take the text "Order 1122 shipped on 2026-11-20". The digits found are 1, 1, 2, 2, 2, 0, 2, 6, 1, 1, 2 and 0, which gives a total of 12. The digit 2 appears five times, the digit 1 four times, the digit 0 twice and the digit 6 once. The text has four groups of digits: 1122, 2026, 11 and 20. Four different digits are used: 0, 1, 2 and 6. The tool shows exactly these figures.

Why count digits at all

Digit counts are a simple but useful check. Many identifiers have a fixed length: a United States phone number has ten digits without the country code, and a payment card number usually has sixteen. If the count is off by one, a digit was dropped or added when the value was typed or copied. In data work, a quick digit count can reveal that a column meant to hold names also contains numbers, or that a field full of codes contains stray letters. Because the tool also shows how often each digit appears, you can see at a glance whether the digits look evenly spread or are dominated by one value, which sometimes signals a placeholder such as a run of zeros.

You can also use it for classroom exercises. Ask students to predict how many times the digit 1 appears in a paragraph, then check the answer. The per-digit rows make the result easy to discuss, and the percentages show the idea of frequency.

Common uses

  • Checking that a phone number, card number or code field has the right number of digits.
  • Finding out how numeric a piece of text is before cleaning it for analysis.
  • Counting digits in a data export or a log excerpt.
  • Checking puzzle, cipher or classroom exercises that mention digit counts.
  • Spotting whether a text contains digits from a script you did not expect.

Step by step

  1. Paste or type your text into the box.
  2. Leave the other-scripts option on or off as you prefer.
  3. Press Count digits.
  4. Read the total and the table of digits.
  5. Change the text and press the button again to compare.

Digits versus numbers

A digit is a single symbol, while a number can be written with many digits. The number 2026 is one number but four digits. The counter reports the digits, so a long figure with many digits adds a lot to the total, even though it is a single value. If you need the number of words or letters instead, use the word counter, which counts words, characters and sentences.

Spaces, punctuation and letters are never counted as digits. Roman numerals such as XII are letters, so they do not count either, and fractions such as the vulgar fraction one half are not decimal digits. Superscript digits are a special case: they belong to a different Unicode category from the decimal digits, so they are not included.

Limits and privacy

The tool accepts up to two million characters. All the counting is done in your browser, so nothing you paste leaves your device. Percentages in the table are rounded to one decimal place and are calculated from the ASCII digits only, so the ten lines add up to about one hundred per cent when the text contains at least one digit.

What next

Use this often? Add Digit to your Home screen.

Frequently asked questions

How does the digit counter work?

It goes through your text character by character and counts each digit from 0 to 9, plus digits from other scripts if you leave that option on. The total and a breakdown per digit are shown.

Does the digit counter count digits from other languages?

Yes, if the option is ticked. Characters in the Unicode decimal digit category, such as Arabic-Indic or Devanagari digits, are counted on their own row and included in the total.

Are spaces and letters counted?

No. Only digit characters are counted. Letters, spaces, punctuation and Roman numerals are ignored, though the total character count is shown for reference.

What is a group of digits?

A group is an unbroken run of the digits 0 to 9. Any other character, including a dot or a comma, ends the group, so 1,250 counts as two groups.

Is my text uploaded?

No. The digit counter works in your browser and nothing is sent anywhere.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Text & Writing Tools