MakeMyTxt
← Back to blog

How to Count Words Accurately

·7 min read

Paste the same paragraph into Microsoft Word, Google Docs, and three different online word counters. You will get at least two different numbers. Sometimes three. The differences are usually small — a word or two — but when you are writing to a strict limit, a word or two is the difference between “submitted” and “rejected.”

The reason is simple: there is no universal definition of “word.” Every tool has to decide what counts, and they do not all decide the same way.

Why Word Counts Disagree

At the most basic level, a word counter splits text on whitespace and counts the resulting pieces. That handles the easy cases. The hard cases are the ones that trip up different tools:

Hyphenated Compounds

Is “well-known” one word or two? Microsoft Word counts it as one. Some online tools split on hyphens and count it as two. The AP Stylebook treats most hyphenated compounds as single words. Academic style guides vary. If you are writing to a 500-word limit for a journal submission, this matters — a paragraph heavy with hyphenated terms could swing your count by a dozen words depending on the tool.

Contractions

“Don’t” is universally treated as one word, but “it’s” sometimes gets split by tools that treat apostrophes as word boundaries. Most modern counters handle contractions correctly, but older or simpler regex-based tools occasionally choke on them.

Numbers and Abbreviations

“3.14” — is that one word? Zero words? What about “U.S.A.”? Word counts it as one word. A naive split-on-periods approach would break it into three. Currency values like “$4,500.00” can cause similar disagreements.

Em Dashes and Special Characters

Write “the result — surprisingly — was zero” with em dashes and most tools count six words. Write it as “the result—surprisingly—was zero” without spaces around the dashes, and some tools count four words because they do not recognize the em dash as a word separator.

Multiple Spaces and Line Breaks

Paste text from a PDF and you often get double spaces, tab characters, or unusual line breaks. A good word counter normalizes whitespace before counting. A bad one counts empty strings between consecutive spaces as “words,” inflating the total.

How Popular Tools Count

Here is how the major word processors and online tools handle the edge cases above:

Microsoft Worduses a sophisticated tokenizer that handles hyphenated compounds as single words, recognizes contractions, and correctly groups numbers with decimal points. Its count is the de facto standard in publishing, academia, and legal contexts. If a submission guideline says “2000 words,” they almost certainly mean 2000 words as counted by Word.

Google Docs produces counts very close to Word in most cases. Minor differences appear with unusual Unicode characters and some edge cases involving embedded formulas or special characters. For plain text, Word and Docs usually agree.

Online word counters vary widely. The simplest ones split on /\s+/(any whitespace) and count non-empty results. That is actually a reasonable approach for most text. It handles multiple spaces and line breaks correctly, treats “well-known” as one word (no whitespace to split on), and handles contractions fine. Where simple counters fall apart is with em dashes without spaces and unusual Unicode whitespace characters.

LaTeX word counting is its own challenge. Tools like texcount parse the LaTeX source and try to count only the words that will appear in the rendered output, excluding commands, comments, and preamble content. But they cannot perfectly predict what macros will expand to, so the count is always an estimate.

When Exact Word Count Matters

Not every context demands precision. Here is when it actually matters:

Academic Submissions

Journal articles, conference papers, and grant proposals almost always have strict word limits. Exceeding the limit can mean automatic desk rejection — the editor never even reads your paper. Most journals specify “excluding references and figure captions” or “including abstract,” so you need to count the right sections. Copy the relevant text into a standalone counter rather than relying on the word processor’s total document count.

Social Media and Ad Copy

Twitter/X has a character limit, not a word limit, but many ad platforms, meta descriptions, and content briefs specify word counts. Google meta descriptions work best at 150-160 characters, which is roughly 25-30 words. Facebook ad primary text performs best under 125 characters. These are soft limits — your ad will still run — but exceeding them means truncation.

Contracts and Legal Documents

Court filings have word limits. The U.S. Supreme Court limits principal briefs to 13,000 words. Federal appellate courts cap at 13,200 words for opening briefs. The Federal Rules of Civil Procedure specify word limits for various motions. Courts have rejected filings for exceeding limits by as few as 50 words.

Freelance Writing

If you are paid per word, the count determines your invoice. A 2,000-word article at $0.15/word is $300 — but if the client’s counter says 1,950 words and yours says 2,010, you have an awkward conversation. Agree on a counting tool up front.

Practical Tips for Hitting a Target Word Count

These are techniques that actually work, not padding strategies:

Write first, count later. Watching the word count climb in real time makes you self-conscious. Write your draft without checking, then measure. You will almost certainly be within 20% of your target, and editing is easier than writing-to-a-number.

Use the same counter your reader will use. If you are submitting to a journal that uses Word, count in Word. If you are writing for a CMS that shows a live word count, test your text there. If you do not know what they use, use a purpose-built word counter and note the count when you submit.

When cutting, remove whole sentences, not individual words. Trimming “very” and “really” from a 2,200-word essay to hit 2,000 is tedious and makes the prose feel choppy. Instead, find the weakest paragraph and cut it entirely. Then tighten one or two others. You will get a better piece and a lower word count.

When expanding, add examples, not adjectives. If you need 200 more words, adding a concrete example or a short case study is more valuable than inflating existing sentences with filler. A specific example adds substance. An extra adjective adds nothing.

Count early sections separately. For academic papers with section-specific limits (e.g., abstract under 250 words, methods under 1,000), count each section individually as you draft. It is much harder to redistribute words between sections after the fact.

How Word Counting Actually Works in Code

Under the hood, most word counters use a variation of this approach: split the text on whitespace boundaries, filter out empty strings, and count what remains. In JavaScript, that looks like:

text.split(/\s+/).filter(Boolean).length

This one-liner handles multiple spaces, tabs, and newlines correctly. It counts “well-known” as one word and handles contractions like “don’t” without issue. For most real-world text, it produces the same count as Microsoft Word.

More sophisticated counters add rules: split on em dashes, handle CJK characters (where “words” are not separated by spaces), and strip markup or formatting before counting. But for English prose, the whitespace-split approach is reliable enough that you will rarely see it disagree with Word by more than one or two words per thousand.

The real takeaway: word counting is not a solved problem with a single right answer. Different tools make different choices about edge cases, and those choices compound across a document. Know which tool your reader uses, match it, and you will never be surprised by a count mismatch at submission time.

Try it yourself

Use our free Word Counter — runs entirely in your browser, no sign-up required.