Token & Cost Calculator
Paste your prompt to count tokens and calculate the exact API cost across all major AI providers. No login required.
💸 API Cost EstimatePrices per 1M tokens
Prices last verified: 2026-06-29 · Always confirm on the official pricing page.
What is an AI Token?
LLMs like ChatGPT, Claude, and Gemini process text in chunks called "tokens". A token is roughly 4 characters or 0.75 words in English. When using AI APIs, you are billed separately for input tokens (what you send) and output tokens (what the AI generates back).
What is Cached Input Pricing?
Several providers (OpenAI, Anthropic, Google) offer a heavily discounted "cached" rate when the same prompt prefix is reused across multiple API calls. This is especially valuable for system prompts or long shared context that you send on every request.
Why does Llama 4 Maverick have no fixed price?
Meta released Llama 4 as an open-weight model, meaning anyone can run it. The price you pay depends entirely on which cloud provider hosts it for you (e.g., AWS Bedrock, Azure, Together AI, or OpenRouter), and rates vary between providers.
Frequently Asked Questions
How accurate is the token count?
Our token counter uses a highly optimized heuristic of Characters / 4, which aligns within ~5% of official tokenizers like OpenAI's `tiktoken`. It is designed for fast, client-side estimates.
Does this calculator include OpenAI API discounts?
Yes. If a model supports "Cached Input" (like GPT-4o or Claude 3.5 Sonnet), we display the discounted rate on the dashboard.
How often are prices updated?
We update our pricing directory monthly to ensure you always have access to the latest API changes from major providers.
Does text language affect token count?
Yes! English is highly optimized and usually maps 1 token to 1 word. Languages like Japanese, Korean, or Arabic often map 1 character to multiple tokens, increasing API costs significantly.