Step 1: clean the text
Before counting, invisible characters such as zero-width joiners are removed so that they do not split words. This matters especially for Urdu and other right-to-left scripts, where such joiners are used to control how letters connect. Line breaks and tabs are treated as spaces between words.
Step 2: tokenise
The tokenizer reads the text and extracts runs of Unicode letters, combining marks and digits. A run may be joined to the next by a single apostrophe, hyphen or one of the common internal connectors: full stop, comma, colon, slash, at-sign, underscore and percent sign, but only when another letter or digit follows. This design means “don’t”, “well-known”, “3.14”, “1,250”, “U.S.A.”, “10:30” and “www.example.com” are each one word. A token must contain at least one letter or digit, so a lone dash, bullet or emoji is not a word.
Examples
| Text | Words counted | Why |
|---|---|---|
| don’t | 1 | Apostrophe inside a word |
| well-known | 1 (2 if hyphens split) | Hyphen joins letters; optional setting |
| 2026 | 1 | Numbers are words |
| 1,250 | 1 | Comma between digits |
| 3.14 | 1 | Decimal point between digits |
| U.S.A. | 1 | Dots between letters |
| www.example.com | 1 | Dots between letters |
| and/or | 1 | Slash between letters |
| word—word (em dash) | 2 | An em dash is not a connector |
| — (alone) | 0 | No letter or digit |
| 😀 | 0 | Emoji are counted separately |
| اردو متن | 2 | Unicode letters, any script |
Two options on the main counter, Hyphen = 2 words and Skip numbers, let you match a rulebook that differs. See Do Hyphenated Words Count as One or Two? and Do Numbers Count as Words?.
Step 3: count related units
Characters are counted as Unicode code points, with and without whitespace. Sentences are found by splitting at . ! ? … and the Urdu ۔ and ؟ when followed by a space or the end of text, and at line breaks. Paragraphs are blocks separated by blank lines. Reading time divides words by 238 and speaking time by 130, as explained in How Reading Time Is Calculated.
Why counters disagree
Microsoft Word, Google Docs and online tools each make slightly different choices. Word splits strictly on spaces, so “word—word” without spaces is one word in Word. Google Docs treats an em dash as a separator. A tool that counts every run of letters would split “U.S.A.” into three. Over a 5,000-word document, these differences usually amount to a handful of words. If a portal has its own counter, its figure is final; see How Microsoft Word Counts Words and How Google Docs Counts Words for those programs.
Try it yourself
Put the numbers above to work with these free tools:
Frequently asked questions
Are numbers counted as words?
Yes. See Do Numbers Count as Words?.
Are URLs one word?
Yes, as long as they contain no spaces.
Is there an official definition of a word for word counts?
No. Each program defines its own, which is why totals can differ slightly.