How many tokens are in a PDF?
The short answer
A typical text-only PDF is ~250 to 400 tokens per page of normal-density English. A 20-page document is usually 5,000-8,000 tokens.
That estimate assumes:
- Standard letter or A4 page size
- 11pt or 12pt body text
- ~500 words of text per page (after stripping headers, footers, page numbers)
Why the range is so wide
PDFs aren't uniform. The token count for the same page varies by:
- Density. A double-spaced manuscript page might be 150 tokens. A dense legal page can be 700.
- Tables and code. Tables and code blocks tokenize less efficiently than prose — more tokens per visible character.
- Scanned vs. text PDFs. A scanned PDF is *images*, not text. It needs OCR before any text-based tokenizer sees it. A 100-page scan might be 0 text tokens (because the model sees images, billed differently) or 30,000+ text tokens after OCR.
- Multimodal models. GPT-4o, Claude, and Gemini can ingest PDFs directly as images. Image tokens are billed differently from text tokens — usually a few hundred per page regardless of content density.
How to get an exact count
1. Extract the text (pdfplumber, pypdf, pdftotext, etc.). 2. Paste it into the counter on the home page. 3. The result is exact for OpenAI, Anthropic, and Gemini.
The cost implication
A 50-page PDF at ~325 tokens/page is ~16,000 tokens. On Claude Sonnet ($3/M input), that's about $0.05 per call to feed it as context. On Claude Opus ($15/M), ~$0.25. On Gemini 2.5 Flash ($0.075/M), about $0.001.
If you're going to send the same PDF to a model many times, cache the embedding or use a model with prompt caching to avoid re-tokenizing on every call.
Try this on every model
- Claude Opus 4.7 $15.00/$75.00
- Claude Sonnet 4.6 $3.00/$15.00
- Claude Haiku 4.5 $0.80/$4.00
- GPT-4o $2.50/$10.00
- GPT-4o mini $0.15/$0.60
- GPT-4 Turbo $10.00/$30.00
- Gemini 2.5 Pro $1.25/$10.00
- Gemini 2.5 Flash $0.07/$0.30
- Llama 3.1 405B $3.50/$3.50
- Llama 3.1 70B $0.59/$0.79
- Llama 3.1 8B $0.18/$0.18
- Mistral Large $2.00/$6.00
- DeepSeek V3 $0.27/$1.10
- Qwen 2.5 72B $0.90/$0.90
- Qwen 2.5 Coder 32B $0.80/$0.80