LaTeX Word Counter
Paste your .tex source and get the numbers TeXcount would report: words in the running text, words in headings, words in captions and footnotes, and a separate count of headings, floats and formulas. Commands, comments, math, tables and the preamble are left out, a section-by-section table shows where the words are, and your source is shown with every counted word highlighted. It runs in your browser — nothing is uploaded. Free, no sign-up.
Counted in your browser by a port of TeXcount's rules. Nothing is uploaded.
Paste LaTeX source, or load the example, to count its words.
How to Use the LaTeX Word Counter
- 1. Paste the source. Copy the contents of your .tex file — the whole document or only a section — into the box, or open a file from your computer. Load the example fills in a short paper.
- 2. Read the three word counts. Words in text is the body. Words in headers covers sections, the title and the abstract heading. Words in captions and footnotes is everything else that is read by a human but sits outside the main flow.
- 3. Pick the number your rules ask for. Most word limits mean text plus headers plus captions; some mean text alone. The tool shows the text-only count, the three added together, and TeXcount's own
-sumfigure, which also adds one for every formula. - 4. Check what was counted. The highlighted copy of your source shows the words in each count in a different colour. If a passage you expected is missing, see the rules below.
- 5. Find the long sections. When the source has sections, a table gives each one's counts so you can see which part to cut.
What Gets Counted, and What Does Not
The counter follows TeXcount's default rules, which are designed to count what a reader sees as words and to leave out everything that is typesetting. The same rule set, transcribed from TeXcount 3.1.1, decides each case below.
| Part of the source | How it is treated |
|---|---|
| Running text, lists, quotes, abstract | Counted as words in text. The abstract also adds one header and one header word, the word “Abstract”. |
\section, \chapter, \title, other headings | Words go to headers; each heading adds one to the heading count. |
\caption, \footnote, \marginpar | Words go to captions and footnotes. A figure or table adds one to the float count. |
Math: $…$, \(…\), equation, align | Not words. Each formula adds one to the inline or displayed count. |
tabular, verbatim, \verb, thebibliography | Contents ignored. |
| Comments after a percent sign | Ignored, like every command name and option. |
The preamble, before \begin{document} | Ignored, except for the words in \title. |
\cite, \ref, \label | Keys are ignored; text inside an optional argument, as in \cite[see page 3]{key}, is counted. |
\href{url}{text} with hyperref loaded | The text counts; the address does not. \url{…} counts as one word. |
What Counts as One Word
A word is a run of letters and digits in any script, and hyphens, apostrophes and full stops between two runs join them: well-known, don't, e.g and 3.14 are each one word. A comma does not join, so 1,000 is two. The apostrophe has to be the plain keyboard one: a typographic apostrophe, as in don’t, splits the word in two, exactly as in TeXcount. Accents written as commands, such as caf\'e, stay inside the word, and Chinese, Japanese and Korean characters count one word each.
Worked Example
Load the example gives 31 words in text, 7 in headers, 7 in captions and footnotes, 4 headings, 1 float, 1 inline and 1 displayed formula; TeXcount's -sum is 47. The seven header words are the four of the title, the abstract's one, and one each for “Introduction” and “Method”. The seven caption words are the three of the footnote — “See Smith (2020)” — and the four of the table caption. The equation and the formula in the Method section add to the math counts only. The section table shows 8 words in text before the first section, 20 in Introduction and 3 in Method.
How This Differs from Running TeXcount
- Other files are not followed. TeXcount can read
\inputand\includefiles with its-incor-mergeoption. A text box has only one file, so the tool lists the files you include and counts what you paste. Paste chapters one at a time and add the totals. - The bibliography is not included. That is TeXcount's default too; its
-incbiboption adds a compiled .bbl file, which a pasted source does not have. - Special comments are partly supported.
%TC:ignorewith%TC:endignore,%TC:break,%TC:macro,%TC:envirand%TC:macrowordwork; the other instructions are reported as unsupported. - Unicode tables may differ at the edges. Letters are classified by the browser's Unicode data, TeXcount's by Perl's, so a rarely used script could differ by a character or two.
- Package rules are included for the common packages — hyperref, url, xcolor, graphicx, babel and about a dozen others — and apply once the package is loaded in the pasted preamble.
Check your own limit
Institutions define “word count” differently: some exclude footnotes, captions, tables or the abstract, and some count them. This tool reports each part separately so you can add what your rules include. For plain text, Academic Word Counter applies exclusions for references, quotations and citations.
Frequently Asked Questions
- How do I count words in a LaTeX document?
- Run TeXcount on the .tex file, or paste the source into this tool. A raw word counter overcounts because it treats every command and equation as words; a LaTeX-aware counter reads the markup and counts only the text a reader sees.
- Does the word count include equations?
- No. Math is not counted as words. Each inline formula and each displayed equation is counted on its own line instead, and TeXcount's
-sumfigure adds those to the three word counts, one per formula. - Are the bibliography and citations counted?
- The reference list is not:
thebibliographyis ignored and a BibTeX\bibliographyline contributes nothing. Citation commands such as\cite{key}contribute no words either, because the key is not text. Only words you type into an optional argument, as in\citep[page 3]{key}, are counted. - Why are words in my table missing?
- Text inside a
tabularenvironment is ignored by TeXcount's default rules. The table's caption is counted, under captions and footnotes. To count a table's cells, put the special comment%TC:envir tabular [xxx] texton a line before the table; TeXcount and this tool then read its cells as text. - Why is my count different from Word, Overleaf or my own TeXcount run?
- Counters disagree because they define a word differently: some split at hyphens, some treat every equation as a word, some include the reference list or footnotes. A differing TeXcount result usually comes from included files, a bibliography option or a special comment. Run TeXcount with the same options on the same text and compare.
- How do I leave a section out of the count?
- Put
%TC:ignoreon a line before it and%TC:endignoreon a line after it. Everything between is skipped, including braces and commands. The same comments work for the TeXcount command line, so the numbers stay consistent. - Is my LaTeX uploaded anywhere?
- No. The counting runs in your browser, and an opened file is read there too; nothing is sent to CitationEasy or anywhere else.