Token & Cost Calculator

Paste your prompt to count tokens and calculate the exact API cost across all major AI providers. No login required.

OpenAI🖥 Context: 1M📥 Input: $5/1M📤 Output: $30/1M⚡ Cached: $0.5/1MOfficial Pricing ↗
0
Characters
0
Words
~0
Est. Tokens

💸 API Cost EstimatePrices per 1M tokens

Input (sending your text)$0.0000
Output (same length reply)$0.0000
⚡ Cached Input (if repeated)$0.0000
Total (Input + Output)$0.0000

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.