Word Frequency Counter and N-gram Analyzer
Rank every word and phrase by how often it appears.
Use via API
Count how often each word (or two- and three-word phrase) appears in text, with optional English stop-word removal. Returns the top terms with counts and percentages. Send JSON, get JSON back.
POST https://pithlab.com/api/v1/tools/word-frequency-counter
curl https://pithlab.com/api/v1/tools/word-frequency-counter \
-H "Authorization: Bearer $PITHLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"The quick fox and the lazy dog. The fox runs.","removeStopWords":true,"limit":3}'About the Word Frequency Counter
Count how often every word or two and three word phrase appears in your text, with stop word filtering, minimum length, percentages and CSV export.
How to use the Word Frequency Counter
- Paste or type your text into the box.
- Choose single words, two word phrases or three word phrases.
- Tick Remove stop words to hide words like the and of, and set a minimum word length if needed.
- Sort the table by count or alphabetically. Percentages show each term's share of the text.
- Copy the list or download it as a CSV file for a spreadsheet.
Examples
Input
The fox saw the dog. The dog ran.
Output
the 3 (37.50%) dog 2 (25.00%) fox 1 (12.50%) ran 1 (12.50%) saw 1 (12.50%)
Input
Machine learning is fun. Machine learning models learn from data.
Output
machine learning 2 (25.00%) learning models 1 (12.50%) models learn 1 (12.50%)
Frequently asked questions
How is this different from the Word Counter?
The Word Counter gives totals such as words, sentences and reading time. This tool lists every distinct word or phrase with its count and percentage, and adds phrases, stop word filtering and CSV export for deeper analysis.
How are words found?
Words are split with your browser's built-in Unicode word segmentation (Intl.Segmenter), so accented letters, scripts written without spaces such as Chinese and Japanese, and contractions such as don't are handled. Curly and straight apostrophes count as the same.
How are phrases counted?
Phrases are runs of consecutive words. They never cross sentence punctuation (. ! ? ; :) or a line break, but commas do not break them. With stop words removed, a phrase is skipped if it starts or ends with a stop word, so "learning is fun" is dropped but "cost of living" is kept.
What is the percentage based on?
Each count is divided by the total number of words (or phrases of the chosen length) in the whole text, before any filter. So a word's percentage is its real share of the text, like keyword density.
Which stop words are removed?
A list of about 180 common English function words such as the, and, of, is and their contractions. Other languages are counted normally but have no stop word list.