Word CounterFree online other calculator — instant results, no sign-up
Count whitespace-separated words.
Sign in to save results and favorites.
About the Word Counter
The Word Counter counts words by treating whitespace as the separator between text segments. Paste or type text to get its total in words; punctuation attached to a segment does not create an additional word.
- Text
- The text to count, entered as characters with no measurement unit; the default is “Hello world. This is a sample.”
Formula and method
W = |S(T)|, where S(T) is the sequence of nonempty segments obtained by splitting T on whitespace. For T = “Hello world. This is a sample.”, S(T) = [“Hello”, “world.”, “This”, “is”, “a”, “sample.”], so W = 6 words.
- TThe input text.
- S(T)The sequence of nonempty, whitespace-separated segments in the input text.
- |S(T)|The number of segments in that sequence.
- WThe resulting word count, expressed in words.
Split the text at whitespace, such as spaces, tabs, and line breaks, and count only nonempty segments. Repeated whitespace and whitespace at the beginning or end do not add words. Empty or whitespace-only text has a count of zero.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- TextHello world. This is a sample.
Results
- Result6 words
How to use the Word Counter
- 1Enter or paste your content into the Text field.
- 2For the worked example, use the exact default text: “Hello world. This is a sample.”
- 3Review the whitespace separators, since they determine where one counted word ends and the next begins.
- 4Read the Result output: the default text produces 6 words.
Reading your result
The Result row reports the total number of nonempty whitespace-separated segments, in words. For “Hello world. This is a sample.”, Result = 6 words. The periods remain attached to “world.” and “sample.” and do not increase the count.
Limitations
This is a whitespace-based count, not a linguistic analysis. Hyphenated or apostrophe-containing text without internal whitespace counts as a single segment, and standalone punctuation or symbols surrounded by whitespace also count as words. Text in languages that do not normally separate words with spaces may be undercounted relative to a linguistic word count. HTML markup and code are treated as text rather than interpreted or removed.
Common questions
Do extra spaces, tabs, or line breaks increase the word count?+
No. They act as separators, and empty segments are not counted, so adding whitespace between existing words does not increase the total.
Why does the default text count as 6 words despite its periods?+
The counted segments are “Hello”, “world.”, “This”, “is”, “a”, and “sample.”. A period attached to a word stays within that segment.
How are hyphenated words and contractions counted?+
A hyphenated expression or contraction counts as a single word when it contains no whitespace. Neither hyphens nor apostrophes are separators for this tool.
Does this Word Counter ignore HTML tags?+
No. It counts whitespace-separated segments in the entered text, including markup. Paste plain text if you want a count that excludes HTML tags.
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
You might also like
Character Counter
Count Unicode code points with and without whitespace.
Sentence Counter
Estimate sentences using terminal punctuation.
Line Counter
Count logical lines, including a trailing empty line.
Text Reverser
Reverse the order of Unicode code points.
Text Palindrome Checker
Check a palindrome while ignoring punctuation and letter case.
Text Slugifier
Create a lowercase ASCII slug from text.
Results are estimates for informational purposes and are not financial, medical or legal advice.