Launch offer: Pro yearly at $29
Docuflat

How many tokens is my PDF or document?

Updated 29 October 2026 · 3 min read

AI assistants don't count words. They count tokens: short pieces of text, often a word or part of a word. Your usage limit, the size of the model's working memory (its context window) and, on the API, the price you pay are all measured in tokens. Knowing the count before you paste a document tells you whether it will fit and what it will cost you.

The quick way: convert it and read the estimate

Open the file in the converter and look under the result. It shows the size of the Markdown and a figure such as "≈2,249 tokens (est.)".

That count is for the text the AI will actually receive, which is the useful number. It does not include the PDF itself: some services also read each PDF page as an image, which adds tokens you can avoid by pasting text instead (see how to use fewer tokens).

How accurate is the estimate?

Docuflat's estimate is calibrated against OpenAI's o200k tokenizer, the one used by GPT-4o-family models, on English prose, tables, Indian-language text and Chinese. In our test files it was close to the real count; the figures are in the benchmark. Treat it as within about 15%.

Other models use different tokenizers, so Claude, Gemini and others will count the same text differently, usually by a modest amount for English and by more for other scripts. For a hard limit, such as a context window you are close to, leave a margin of 20% or more rather than aiming for the exact number.

Counting by hand

  • English: about 4 to 5 characters per token, or roughly 1.3 tokens per word. A 500-word page is around 650 tokens, and ten pages of dense text are around 6,000 to 7,000.
  • Numbers and symbols cost more. Digits and punctuation tend to take close to a token each, so a spreadsheet or a table full of figures is far more expensive than prose of the same file size.
  • Other scripts: Hindi and other Indian scripts take about three characters per token, and Chinese, Japanese and Korean about one to two. The same sentence can cost noticeably more tokens than its English translation.

Why the file size is a poor guide

A 5 MB scanned PDF may contain no text at all, while a 40 KB Markdown file can run to 10,000 tokens. What counts is how much text there is, what it is made of, and whether the service also processes page images. This is why the same price list gave about 3,700 to 3,900 tokens as a spreadsheet and as a CSV even though the two files differ almost two-fold in size.

What to do with the number

  1. It fits easily: paste the Markdown and ask your question.
  2. It is close to the limit or long: send only the sections you need, or split it, as described in giving a very long document to an AI.
  3. It is a knowledge base for a tool that searches your files: see how to prepare documents for RAG.
  4. It is bigger than you expected: look for repeated headers, footers, blank spreadsheet columns and appendices you don't need, and remove them before you paste.

Whatever the count, read the converted text first. It is the only way to be sure the AI is working from the right words.

More guides