TokenCalculator.dev
Count tokens in text, documents, code, and images, then compare context fit and estimated API costs across major AI model providers.

About TokenCalculator.dev
TokenCalculator.dev measures text, code, structured data, readable documents, and supported images against models from nine providers. It shows token counts, context-window fit, and estimated input cost, with results updating as you edit the input. Text and files are processed in the browser; public model metadata may be refreshed from Models.dev.
Read the estimate in context
The calculator distinguishes exact local OpenAI o200k tokenization from provider-calibrated projections for Claude, Gemini, and DeepSeek. Image estimates follow documented provider rules where available. Scanned PDFs are rejected because OCR is not included, and an image result estimates token use rather than extracting words. Rates and provider billing details can change, so treat projections as planning aids and check the provider's documentation before budgeting a production workload.
Features of TokenCalculator.dev
- Counts text, code, structured data, PDFs, DOCX files, and supported images locally in the browser.
- Compares token counts, context fit, and estimated input costs across 41 models and nine providers.
- Shows the method and accuracy level used for each estimate.
- Includes a workload planner for request volume and input/output cost projections.
Use Cases of TokenCalculator.dev
- Measure a prompt or code excerpt before sending it to an AI API.
- Check whether readable documents and prompt text fit a model's context window.
- Estimate image-token impact for supported vision models.
- Compare projected costs for the same workload across providers and models.
Frequently Asked Questions
Does it upload my prompt or files?
The supplied product information says text and files stay in the browser; public model metadata may be refreshed from Models.dev.
Are every provider's token counts exact?
No. OpenAI text uses local o200k tokenization; Claude, Gemini, and DeepSeek use deterministic provider-calibrated projections.
Can it count scanned PDFs or read words in images?
Scanned PDFs are rejected because OCR is needed. Image measurements estimate visual token use and do not extract image text.
Explore more in this category:
Similar to TokenCalculator.dev
Warmloop
Extension-free LinkedIn outreach with an AI SDR that runs the whole prospect-to-meeting path: finds leads, writes, answers replies and books the call.
ProWebLook
API-first platform for Phone, WhatsApp (no OTP), Email, Caller ID & Edge IP checks, SERP scrapers, and a 19-tool remote MCP server.
Speak Tech English
AI speaking coach for tech English: practise stand-ups, code reviews and interviews out loud, with feedback after every talk.
Datum BrowserReal
Cloud Chrome for AI agents: real browsers websites treat as people, with live view, recordings and proxies. $0.04 per browser hour, $1 free.
LaunchSaaS
16 copy-in SaaS packages for Next.js and Supabase, each with an Agent Skill for Claude Code. $99 one-time.
ROAZ
ROAZ is a Meta ads analysis tool you talk to in plain English. A read-only MCP reads your ad account and tells you exactly what to fix.